How to we restart a Tomcat 7 instance without redeploying war files

deploymenttomcat7

Scenario: Bad logging configuration internal to war file. No Manager app in the instance.

Is there a JVM property or something we can set that will cause Tomcat to NOT redeploy on restart? That way we can just edit the properties file under webapps. Can't just temporarily move the war file for the startup as this would cause all kinds of organizational auditing problems.

This is a temporary fix, of course. I've been pushing Spring based external configuration for log4j to handle exactly this sort of thing.

Best Answer

Please set the value of the deployOnStartup attribute to false in the Host element (the default is true). Recommend to keep the autoDeploy attribute true in case you will update wars

<Host name="localhost"  deployOnStartup ="false"
            unpackWARs="true" autoDeploy="true" ...>
…
 </Host>

See for details: http://tomcat.apache.org/tomcat-7.0-doc/config/host.html