SE452: Tomcat Installation and Setup [5/24] Previous pageContentsNext page

Installing Tomcat

  1. Download the zip file from http://jakarta.apache.org/ (or get it from the cd supplied in class)
  2. Get the current version (5.0.9 beta at time of writing)
  3. Unzip it to a directory (ex. D:\, or /users/mwright)
    The top level directory for Tomcat is jakarta-tomcat-4.0.1 This directory is known as Tomcat root or Tomcat home It will be referred to as "tomcat_home"

Subdirectories in "tomcat_home":

Now, it's probably worth discussing how Tomcat handles classloading. You will need to understand this a bit more as you develop more sophisticated applications. Tomcat loads creates a set of class loaders when it is started, with parent-child relationships.

        Bootstrap
          |
       System
          |
       Common
      /      \
 Catalina   Shared
             /   \
        Webapp1  Webapp2 ... 
        

Read the documentation at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/index.html

Set some environment variables

Only JAVA_HOME is really needed, but the second ensures you point to the right instance of Tomcat if you have more than one installed.

On Windows:

	set JAVA_HOME=c:\j2sdk1.4.2
	set CATALINA_HOME=c:\jakarta-tomcat-5.0.9
        

On Linux (bash)

	export JAVA_HOME=/usr/local/j2sdk1.4.2
	export CATALINA_HOME=/usr/local/jakarta-tomcat-5.0.9
        

Previous pageContentsNext page