This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamically load properties file

 
prithivirajan dhamodharan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the load the Application Resource properties without reloading/restart the application.

ie, it should detect the change of values happened in properties file and the new value should get loaded
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prithivirajan,

As far i know it is not possible. You need to restart the server for the same because it is loaded on server start up and to change it would also req a server restart.
 
prithivirajan dhamodharan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about configuring a separate servlet,

which can retrieve the ActionServlet stored in ServletContent and invoke the initModuleMessageResources(moduleConfig) method to load property file again.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A number of people of asked this question in this forum, and we've told each of them the same thing we've told you: Struts doesn't support it. Some of them have tried various means of doing it anyway, but to my knowledge no one has reported any success.

If you have a good idea for how to do it, by all means try it. If you are successful, please share your method with us.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic