Metawerx Support - How do I deploy my WAR file on Tomcat?

You have two choices for deploying a WAR file.

Deploying a WAR file

  • Upload the WAR file to /private-cgi-bin/tomcat
  • Tomcat will automatically deploy the WAR using it's autoDeploy feature, and unpack it using it's autoUnpackWars feature (if enabled)
  • In some versions of Tomcat (5.0 and earlier), autoUnpackWars is disabled by default on new accounts. If your WAR does not unpack automatically, please contact support to have this feature enabled.
  • To remove or restart the application, use the Tomcat Manager
  • To deploy an application as the ROOT application for your site, undeploy any existing ROOT application using the Tomcat Manager, and upload your application as /private-cgi-bin/tomcat/ROOT.war

Important Notes

  • When using a WAR file that is still packed as a single WAR file, your application is unable to write to it's Application Root, because the root folder is inside the WAR file. It is therefore preferable to deploy the application in an unpacked format (files, folders, etc...) instead of a WAR file.
  • Tomcat has a habit of locking WAR files sometimes, making them impossible to undeploy. For this reason, it is also preferable to upload unpacked applications, or use the autoUnpackWars feature of Tomcat. This also avoids having to upload large WAR files each time you change your project.

More Information

metawerx specific

referring pages