Tomcat 4.x Installation

There are a number of steps to install tomcat/apache:

JDK Installation

1. Download the latest version JDK which currently at J2SE 1.5.0_01.

2. Install the software in C:\ jdk1.5.0_01

3. Setup the JAVA_HOME variable in start->control panel->system and set to c:\jdk1.5.0_01

4. Check your setting by running "echo %JAVA_HOME%" in a command window.

Apache Installation

1. Down the latest version of apache (version 2.0.54)

2. Install the software using the custom setup. Then select to change the destination folder, make this "c:\apache" (if the directory does not exists then create it). use all existing defaults after this.

3. Once installed you should have a directory "c:\apache\apache2" and a apache server running on port 80. Use your browser to test this.

Tomcat Installation

1. Create a folder "c:\tomcat" on your hard drive in preparation for the tomcat installation.

2. Down the tomcat binary (tomcat 4.1.31)

3. Start the installation but do not take the default directory but change it to "c:\tomcat\tomcat-4-1-31".

4. Enter your the username as admin and a password.

5. Once installed you should have a directory "c:\tomcat\tomcat-4-1-31" and a tomcat server running on port 8080.

6. Use your browser to test this:
                                              http://localhost:8080/examples/jsp/index.html (JSP test)
                                              http://localhost:8080/examples/servlets/index.html (Servlet test)

JK Connector Installation

1. Down load the latest connector mod_jk-1.2.14-apache-2.0.54. You will have noticed that it matches the apache_2.0.54 version we installed earlier.

2. Place the file in "c:\apache\apache2\modules", note that both .dll or .so files are OK.

3. Add the following line to the apache config file in "c:\apache\apache2\conf\httpd.conf"
LoadModule jk_module/

4. You could run the following command to test the syntax of the apache config file, you should get "syntax OK"
              c:\apache\apache2\bin\apache.exe -t

5. Edit tomcat configuration file "c:\tomcat\tomcat-4-1-31\conf\server.xml" and add the following below:

edit one
find this line:                          <Server port="8005" shutdown="SHUTDOWN" debug="0">
add this line just below:         <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
                                                 modJk="c:/apache/Apache2/modules/" />

edit two
find this line:         <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true">
add this below:    <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true"
                                 forwardAll="false" modJk="c:/apache/Apache2/modules/" />

7. Once the changes have been saved we need to restart tomcat. Once tomcat has been restarted check to see if a file called I"c:\tomcat\tomcat-4-1-31\conf\auto\mod_jk.conf" exists if not then go back and repeat step 5.

6. Create the workers file called "" and save it to "c:\tomcat\tomcat-4-1-31\conf\jk"

# Definition for Ajp13 worker

7. In the last step open up apaches config file and add to the bottom of it the following:

Include c:\tomcat\tomcat-4-1-31\conf\auto\mod_jk.conf

Check Tomcat/Apache

1. Stop and restart Tomcat.

2. Stop and restart Apache.

3. Check the following web pages

Test apache - http://localhost  (if not working see step apache installation)
Test tomcat  - http://localhost:8080/examples/jsp/index.html (if not working see tomcat installation)
Test tomcat/apache - http://localhost/examples/jsp/index.html (if not working see jk installation)

4. if all web pages work then mod_jk is working. if not then retrace all of the above