wood burning stoves 2.0*
The moose likes Tomcat and the fly likes i want to load property file without restarting tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "i want to load property file without restarting tomcat" Watch "i want to load property file without restarting tomcat" New topic
Author

i want to load property file without restarting tomcat

Vrushank Joshi
Greenhorn

Joined: Oct 24, 2004
Posts: 11
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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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

Joined: Sep 23, 2004
Posts: 245
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.


<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Vrushank Joshi
Greenhorn

Joined: Oct 24, 2004
Posts: 11
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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i want to load property file without restarting tomcat
 
Similar Threads
Tomcat Manager Authentication fails
Reloading Struts config in 1.1
How Replace Servlet When Tomcat is running ????
Spring Property reading
How Replace Servlet When Tomcat is running ????