Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamically load properties file  RSS feed

 
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
 
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.
 
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.
 
All of the following truths are shameless lies. But what about this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!