Deployment on Tomcat startup

If you are not interested in using the Tomcat Manager, or TCD, then you’ll need to deploy your web applications statically to Tomcat, followed by a Tomcat startup. The location you deploy web applications to for this type of deployment is called the appBase which is specified per Host. You either copy a so-called exploded web application, i.e. non-compressed, to this location, or a compressed web application resource .WAR file.

The web applications present in the location specified by the Host’s (default Host is “localhost”) appBase attribute (default appBase is “$CATALINA_BASE/webapps”) will be deployed on Tomcat startup only if the Host’sdeploy OnStartup attribute is “true”.

The following deployment sequence will occur on Tomcat startup in that case:

  • Any Context Descriptors will be deployed first.
  • Exploded web applications not referenced by any Context Descriptor will then be deployed. If they have an associated .WAR file in the appBase and it is newer than the exploded web application, the exploded directory will be removed and the webapp will be redeployed from the .WAR
  • .WAR files will be deployed
A word on Contexts
Deploying on a running Tomcat server

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?