Setting up Apache Tomcat for Upgrades

Plan for Change.

Note: This article is based on Apache Tomcat 6.0.20

If you set up a lot of Tomcat sandboxes, here is a sample structure to make it easy to upgrade to a new version of Tomcat without having to reinstall all applications. The trick is to have a number of Tomcat sandboxes pointing to a symbolic link, which in turn points to the latest version of Tomcat.

Download Tomcat

Get latest version of Tomcat from Apache. Check signature. Decompress. Untar.

Now create a symbolic link to this latest version

Create a sandbox

A sandbox refers to a directory where you are testing a web application. Portions of the sandbox are linked back to the latest version of Tomcat. Other portions of the sandbox are original to it.

To add a WAR file to Tomcat, simply copy it to the tomcat.sandbox/webapps directory. It will be auto detected when Tomcat starts and deployed.

Finally, start Tomcat.

Obviously, there is more to configuring and running Tomcat. You can get more information by starting at the Tomcat Homepage.


When a new version of Tomcat becomes available, repeat the first step. Download, verify, decompress and untar the latest version, alongside the first version. Then, change the symbolic link of latest Tomcat to the new one.

Now, all sandboxes are pointing at the latest libraries. Restart all sandboxes.

Unless major changes have occurred in configuration files, this trick should let you upgrade painlessly.

Leave a Reply

Your email address will not be published. Required fields are marked *