Search code examples
tomcatcontext.xml

Tomcat - automatic undeploy and redeploy on context.xml changes?


I faced the following problem: Each time when I make changes to Tomcat's conf/context.xml and just save them while Tomcat is running, all webapps get automatically undeployed and re-deployed (according to catalina.out). This leads to undesired downtimes. We have no WatchedResource in the config files, and the logs don't give me any further hints. Catalina itself seems not to be stopped or started. We use Tomcat 9.x.

Is this intended behavior, and how could this be disabled?

Thanks you for some hints.


Solution

  • The feature your refer to is known as automatic application deployment, and yes, it is intended. See Configuration Reference. I also prefer having control over web application restarts, be it live or test systems.

    Try adding autoDeploy="false"to your Hostdefinition in server.xml (default is true).