Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My task involves deploying a Java web application into a Tomcat 6.0.35 instance running on Debian Squeeze. As such, Tomcat is installed from package sources and the web application is deployed from a custom .deb package that puts the .war file into a directory below /opt and registers it with Tomcat by dropping a context XML (let's call it my-app.xml) into /etc/tomcat6/Catalina/localhost/. This works fine for the initial .deb install where the application is picked up by Tomcat's auto deployment mechanism and unpacked into /var/lib/tomcat6/webapps/.

When re-installing a newer version of the .deb, Tomcat will not update the application, though. It will only detect a change if I manually execute a

touch /etc/tomcat6/Catalina/localhost/my-app.xml

Even restarting Tomcat without touching my-app.xml has no effect.

my-app.xml looks like this:

<Context path="/my-app" docBase="/opt/my-app/my-app.war">

IMHO, this should watch for changes of the .war (which changes when I install the updated .deb).

Autodeploy is turned on in server.xml.

Any ideas?

share|improve this question
up vote 2 down vote accepted

Put the touch line into the post-install script of your deb file

share|improve this answer
I would have hoped to be able to solve this by configuration, but sure, this will do as a workaround. – Thilo-Alexander Ginkel Jun 21 '12 at 11:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.