How do I upgrade from Tomcat 3 to Tomcat 4?

Alex Chaffee

There's good news and bad news.

The bad news is that Tomcat 4 was rewritten from scratch, and is a completely different code base than Tomcat 3. All of your server.xml and web server configurations will have to be rewritten, or at least retested, once you install Tomcat 4. It also means that you can't install Tomcat 4 "over" Tomcat 3 (by unpacking it into the same directory, for instance) -- it will have to be installed in a separate location.

The good news is that Tomcat 3 and Tomcat 4 both support the Servlets Spec version 2.2 or greater. That means that your Web applications should work with little or no modifications. Just copy the WAR files to the new CATALINA_HOME/webapps directory and Tomcat 4 should deploy and run them just fine. Or, put the directory path to an unpacked Web application into Tomcat 4's server.xml file in a <Context> element (like <Context path="/foo" docBase="/home/alex/apps/foo" reloadable="true"> -- OK, some of the server.xml configuration looks remarkably similar :-)).