| Author |
Automatically Reloading Servlets in tomcat
|
Afroz Ahmed
Ranch Hand
Joined: Jan 18, 2004
Posts: 64
|
|
Hello All, I am a learner.I want my tomcat 4.1 to automatically reload my servlet class when it was changed. This is my server.xml file contents line for my appl <Context path="/app" docBase="e:/progra~1/Tomcat_app/webapps/app1" debug="0" reloadable="true" crossContext="true"> Later I also added DefaultContext element to host element. <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"> <DefaultContext reloadable="true"/> When i do changes to my servlet and do compilation,replace the files,the tomcat is not taking the changes.When i restart the tomcat, then the changes were working fine. Pl tell me what was the problem or show me the correct way to do it. Thanks.
|
The value of an idea lies in the usage of it.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
Personally I use the Tomcat Management Application - it lets you unload and reload a specific web application. According to the specs, reloadable="true" should work by monitoring the timestamps on the .class and .jar files - I dunno why it doesn't in some installations. Bill
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
|
There are some known problems in Tomcat 4 (specifically with 4.1.27 if I recall) with reloading. Tomcat 5 seems to have solved these issues (and I believe there is a patch for 4.1.27 but I can't vouch for it).
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Afroz Ahmed
Ranch Hand
Joined: Jan 18, 2004
Posts: 64
|
|
Thanks. I will try with the Tomcat Manager Application.How to configure for that. Later,I will do my appl in tomcat 5. Thanks a lot.
|
 |
 |
|
|
subject: Automatically Reloading Servlets in tomcat
|
|
|