Configuring & Using Apache Tomcat 6

A Tutorial on Installing and Using
Jakarta Tomcat for Servlet and JSP Development

Following is a guide to installing and configuring Apache Tomcat 6 for use as a standalone Web server (for development) that supports servlets 2.5 and JSP 2.1. (Note: Apache Tomcat is sometimes referred to as "Jakarta Tomcat" since the Apache Java effort is known as "The Jakarta Project"). This Tomcat tutorial covers version 6.0.10, but the steps are almost the same for any Tomcat 6.0.x version. For coverage of Tomcat 5.5, see the separate Tomcat 5.5 tutorial. For coverage of very old Tomcat versions (Tomcat 5.0.x and Tomcat 4.0.x), please see the Apache Tomcat 5.0 and 4.0 tutorial.

Using Tomcat as a deployment server or integrating Tomcat as a plugin within the regular Apache server or a commercial Web server is more complicated than what is described in this tutorial. Although such integration is valuable for a deployment scenario (see, my goal here is to show how to use Tomcat as a development server on your desktop. Regardless of what deployment server you use, you'll want a standalone server on your desktop to use for development.

The examples here assume you are using Windows, but they can be easily adapted for MacOS, Linux, Solaris, and other versions of Unix. Except when I refer to specific Windows paths (e.g., C:\blah\blah), I use URL-style forward slashes for path separators (e.g., install_dir/webapps/ROOT). Adapt as necessary.

To report errors or omissions in this writeup or to inquire about customized on-site training courses on servlets, JSP, Struts, JSF, Ajax, Java 5, Java 6, and other J2EE technologies, please contact Marty Hall at [email protected].

Executive Summary

Most people will just want to download the preconfigured Tomcat version, set JAVA_HOME and CLASSPATH, and they are done. But following is a summary of the steps for people who want to change the configuration or do it themselves. This section gives a summary of the required steps; I give extremely detailed instructions in the following sections.