Jeremy Stein - Brain

« »

Tomcat deletes context descriptor on redeployment

I like to put machine-specific configuration in the context descriptor outside of the WAR. However, when I drop in a new WAR on a running Tomcat instance, Tomcat deletes my context descriptor. (No, there is no context descriptor in the WAR.) I wanted to be able to deploy an updated web application without restarting Tomcat and using the machine-specific configuration in conf/Catalina/localhost/myapp.xml. But when I drop in the WAR, my configuration file is destroyed.

Steps to reproduce (I’m on Windows XP with Java 1.5):
1) Download Tomcat 5.5.26 and unzip
2) Create conf/Catalina/localhost/test.xml
3) Create a webapps/test.war containing some simple files (no META-INF directory)
4) Start tomcat
5) Create a new test.war and copy over the old one
6) Note that conf/Catalina/localhost/test.xml has disappeared

It looks like it’s back to using server.xml. Apache refuses to fix this, even though the separate-file-per-context was clearly intended to replace context-specific changes in server.xml.

June 17, 2008 No Comments.

No Comments

Be the first to comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

Why ask?

« »