If you don't want autoDeploy feature, in production environments for instance, you may consider the following attributes in the conf/Catalina/localhost context file :
- and deployXML="false"
autoDeploy="false" may not work alone because application context.xml (in META-INF) can override server.xml settings of autoDeploy.
- The application's META-INF/context.xml will be used in development environment, with autoDeploy
- The conf/Catalina/localhost context in production, without autoDeploy.
deployXML attribute documentation attribute documentation is worth reading (§ Standard Implementation).
Exhaustive autoDeploy user case, and when context is removed : i.e. application undeployed, user case is documented can be found here.