Auto-reload web.xml

S

Steven J Sobol

I'm new to Tomcat...

Using 5.0.16, jdk 1.4.2_03

I'm not using a WAR file for my webapp. I have everything stored in
/var/www/virtual_hosts/MyServletSiteURL/WEB_INF. Is it possible to get
Tomcat to detect, automatically, that web.xml has changed, and reload it? I set
the reloadable attribute of the WebApp to true, and have the same attribute set
in the Host entry in server.xml, and changes to the class files are detected and
the servlets get reloaded properly, but if I change the binding of a certain
servlet, for example mapping it to /blah/foo.jsp instead of /foo/blah.jsp, the
server continues to serve it at /foo/blah.jsp unless I stop and restart it.

Can I do what I'm trying to do?

Thanks :)
 
S

Steven J Sobol

Steven J Sobol said:
I'm new to Tomcat...

Using 5.0.16, jdk 1.4.2_03

I'm not using a WAR file for my webapp. I have everything stored in
/var/www/virtual_hosts/MyServletSiteURL/WEB_INF. Is it possible to get
Tomcat to detect, automatically, that web.xml has changed, and reload it? I set
the reloadable attribute of the WebApp to true, and have the same attribute set
in the Host entry in server.xml, and changes to the class files are detected and
the servlets get reloaded properly, but if I change the binding of a certain
servlet, for example mapping it to /blah/foo.jsp instead of /foo/blah.jsp, the
server continues to serve it at /foo/blah.jsp unless I stop and restart it.

Can I do what I'm trying to do?

Duh. I meant I had the reloadable attribute of the Context entry set to True...
 
S

Steven J Sobol

Steven J Sobol said:
Duh. I meant I had the reloadable attribute of the
Context entry set to True...

And, with yet another followup to myself, I know I must look
like a complete moron now...

Changed the mapping for a specific servlet, and now (a couple hours later)
Tomcat is serving it at the new URL. So auto-reloading *does* work for
web.xml, but the server is set to check it at much longer intervals than the
interval at which it checks the class files.

I'll go RTFM now, to find out how to change the interval, and leave y'all
alone. :)
 
A

Andoni

Please don't beat yourself up about replying to yourself.
there aren't nearly enough messages where the answer to the original
question is posted in a way that people can learn from.

Thanks for letting us know.

Andoni.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top