War deployment on Tomcat takes ages

Definitely check the Tomcat logs for any errors/warnings.

You probably have some expensive/sensitive code logic in one of the ServletContextListeners. They are usually initialized during startup. If so, then I would debug/profile it for any performance matters/leaks.


As noted I would copy the war to the webapps folder and let tomcat do the deployment, its also quicker saving you time.

Both Tomcat and Jetty will support a hot deploy. They simply monitor the deploy directory for changes, so you can just copy the .war file into that directory, and the server will undeploy/redeploy.

If using a remote server check the lag is not the time take to upload the war to a remote server over the network.


I upload the WAR to my home directory, cd to /usr/local/tomcat, then run the following commands:

bin/shutdown.sh
rm webapps/ROOT.war
rm -rf webapps/ROOT
cp ~/ROOT.war webapps
bin/startup.sh

Don't use application manager. My way is to upload it somewhere out of the webapps directory and then copy it to webapps directory. Takes a lot less of deplyoment time.