Installing Tomcat

This is a brief "how-to" for installing Tomcat on a Windows PC. The class examples in ECT 433 run on Tomcat version 4.1.x (4.1.27 is currently the most stable version). I have tested these steps on a Windows XP Professional computer but suspect that the procedure will be similar for other Windows computers. Tomcat can also be installed on Linux computers and all of the ECT 433 examples and assignments will work on that too. Since most Linux users will probably be able to work out the installation themselves, I don't cover the installation details for Linux here.

Installing Java

Tomcat requires java in order to run. If your computer already has java installed, you can probably skip this step. However, make sure you have a recent version of java. Here I provide instructions for installing version 1.4.2 of the Java 2 Platform, Standard Edition (J2SE).

Steps for installing java

  1. Go to the download page of J2SE Version 1.4.2.
  2. Select the version for Windows and click through the license acceptance. After two pages, you will be able to download the EXE file for installing java on windows. Look for the SDK version.
  3. Download and run the EXE installation program.
  4. You will need to accept the license agreement again.
  5. Use the suggested directory for installing java (C:\j2sdk1.4.2_01).
  6. You may use the remaining default settings for the installation.

Setting the Java Environment Variable

Tomcat will need to know where you have installed java. To do this, you will need to set the environment variable JAVA_HOME to C:\j2sdk1.4.2_01 (where you installed java).

Here are the steps for setting the environment variable on my computer (Windows XP Professional). The steps will probably be similar for other Windows computers.

  1. Open the control panel under the start menu.
  2. Double-click on System.
  3. Click on the Advanced tab.
  4. Click on the Environment Variables button.
  5. Under System Variables, click on the New button.
  6. For variable name, type: JAVA_HOME
  7. For variable value, type: C:\j2sdk1.4.2_01
  8. Continue to click OK to exit the dialog windows.

Installing Tomcat

After setting the JAVA_HOME environment variable, you can install tomcat.

  1. Go to the Tomcat Web page.
  2. Click on Binaries under the Download label on the left side of the page.
  3. Scroll down until you see Tomcat 4.1.x. (x will be some number greater than 10).
  4. Click on the link ending with exe (e.g. 4.1.27 exe).
  5. Download and run the exe file.
  6. Use the default settings and provide a password that you will remember.

Running Tomcat

Here are the steps to see if Tomcat has been successfully installed

  1. Start Tomcat by finding its start program in the Programs Menu (located in the Start menu). Look under Apache Tomcat 4.1 and select "Start Tomcat".
  2. Open a Web browser and type in the following URL:

At this point, you should see the Tomcat home page, which is provided by the Tomcat Web server running on your computer. Note: if your computer has an internet name or an IP number, you may access your Tomcat server anywhere on the internet by substituting localhost with the full name or IP number.

To shut down your server and remove the Console window, select "Stop Tomcat" in the same menu of where you selected "Stop Tomcat".

Running class examples

Here are the steps for running the class examples discussed on the first day.

  1. Download the zip file containing the class examples.
  2. Unzip the file to produce the folder ect433examples.
  3. Move this folder to the following location on your computer:
  4. Stop and restart Tomcat.
  5. You can access the first example with the following URL:

Running class examples in the Software Exploration Lab (CTI Building room 632)

The computers in this lab already have java and Tomcat installed. The first time you use this lab, you will need to register for an account. Your account should have privileges for placing your Web application folder in the webapps folder (described above). However, in case you cannot stop and start Tomcat as described above, here is an alternate procedure.

  1. Under the Start menu, right-click on My Computer and select "Manage".
  2. Double-click "Services and Applications"
  3. Double-click "Services"
  4. Double-click "Apache Tomcat 4.1"
  5. Use the "Start" and "Stop" buttons to startup and shutdown Tomcat.

Last modified: Fri Sep 12 15:27:56 Central Daylight Time 2003