Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i want to load property file without restarting tomcat

 
Vrushank Joshi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helloo,,
My tomcat is running and mean while i have created one property file and put it in the right place...But usually ,if we want to use that property file, we restarting out tomcat...But i want to reload property file with out restarting tomcat....
Can anybody help me in this problem???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually handle this by creating a "back door" request that causes the property file to be reloaded. You can generate the request off a HTML page with a simple form.
Just put the property file loading in a separate method than can be called from the init() as well as doPost or doGet.
Bill
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Additionally, if your Tomcat virtual host is running the manager webapp you can just reload the particular webapp you want. This would also reload your properties file. My link goes to the 5.0 Tomcat series but the configuration has been the same since 4.1.
 
Vrushank Joshi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m not getting what u want to say... If u have any code for this problem than plz send me that on my mail account vrushankj@yahoo.com
Thanks,
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m not getting what u want to say... If u have any code for this problem than plz send me that on my mail account vrushankj@yahoo.com

You are completely missing the point of JavaRanch. The idea is that by working out problems such as yours in a public topic, other people can profit from your experience thus multiplying the benefit.
So - what didn't you understand about the suggestions?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic