DRAFT

Minimal Apache-Tomcat Implementation
for
ArcIMS

 

 

 

 

 

NOVEMBER, 2001

 

Gary T. Schultz

GIS Specialist

Wisconsin Department of Commerce

Contact information:
gschultz@commerce.state.wi.us
608-266-1283

The following document explains a minimalist Apache-Tomcat setup used for ArcIMS. This process has been tested in a development environment in Windows NT 4, Service Pack 6 with ArcIMS 3.1. The setup process for Windows 2000 should not differ considerably from this process. This has not been tested in a production environment. Users assume the risk of implementing this setup in a production environment.

Terms used throughout this document:

Local drive: refers to the local hard drive where Apache and Tomcat will be stored. For example, "c:", "d:", etc. For this setup the local drive is 'C:'.

Host machine: refers to the UNC name for the machine that will serve Apache and Tomcat (and ArcIMS), for this setup , ARCIMS1.

Directory and folder are used interchangeably throughout this document.

Web sites referenced to develop this setup process are:

Apache-Tomcat How To: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-apache-howto.html

Working with mod_jk: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html

Working with the Jakarta NT Service: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html

Tomcat workers.properties: http://jakarta.apache.org/tomcat/tomcat-3.2-doc/Tomcat-Workers-HowTo.html

This particular setup process comprises four main steps:

  1. Set up environmental variables and a main Apache directory
  2. Download and install Sun Microsystems' JavaTM 2 SDK, Standard Edition Version 1.2.2_009
  3. Download and configure Tomcat 3.2.3
  4. Download and configure Apache 1.3.22

 

STEP 1: Set the following environment variables and main Apache directory.

1.1 Set the environment system variables

Go to Start | Settings | Control Panel | System and click on the Environment tab. The Environment Variables JAVA_HOME and TOMCAT_HOME were added under "User Variables for Administrator".

JAVA_HOME: Path that contains the Java Runtime Environment (jre) to run Tomcat. For this setup the variable JAVA_HOME was set to the value "c:\jdk131".

TOMCAT_HOME. Directory path to where Tomcat will be installed, the Tomcat home directory. For this setup the variable TOMCAT_HOME was set to the value "C:\Apache-Group\jakarta-tomcat-3.2.3\".

1.2 Create a main directory for Apache and Tomcat.

This is optional and is used in this example for organization purposes. For this setup it is

"C:\Apache-Group".

 

STEP 2: Download and install Sun Microsystems' JavaTM 2 SDK, Standard Edition Version 1.2.2_009

This example is successfully running by using the JRE contained in Sun Microsystems' JavaTM 2 SDK, Standard Edition, and not the standard JRE standalone. If you do not have the J2SDK, click here to go to the Sun download site. Download the J2SDK 1.2.2_009, and follow the installation instructions and use the default installation path "c:\jdk1.2.2." Note that the JDK 1.2.2 is used due to problems with JDK 1.3 that affects Java applications being run as Windows NT services. This problem causes the Tomcat service to stop running when the current user logs out. Go to Working with the Jakarta NT Service for more information about this problem.

STEP 3: Download and configure Tomcat 3.2.3

3.1 Download and unzip Tomcat

Tomcat 3.2.3 is the current production quality release of Tomcat and is used in this setup. Click on the link jakarta-tomcat-3.2.3 to download the Tomcat binary file "jakarta-tomcat-3.2.3.zip". When asked, save the file to disk. After the file is downloaded, extract to "C:\Apache-Group" so that the directory "jakarta-tomcat-3.2.3" is created with the full path "C:\Apache-Group\jakarta-tomcat-3.2.3". This will create the Tomcat home directory "C:\Apache-Group\jakarta-tomcat-3.2.3" which will contain the Tomcat files and folders.

3.2 Configure Tomcat file workers.properties and wrapper.properties.

Tomcat workers.properties. First copy the file "Tomcat home\ conf\ workers.properties" for this setup "C:\Apache-Group\jakarta-tomcat-3.2.3\conf\ workers.properties" and paste into the same directory. Rename the file "copy of workers.properties" to "original workers.properties". Open the file "workers.properties" in a text editor and make changes to the tomcat_home and java_home directories as needed. For the setup described in this document, the following changes were made:

workers.tomcat_home=c:\jakarta-tomcat

changed to

workers.tomcat_home=C:\Apache-Group\jakarta-tomcat-3.2.3"

Note that the changes just described may vary depending on the location and name of the jdk folder and the location of the tomcat home directory.

Save and close the "workers.properties" file.

Tomcat wrapper.properties. First copy the file "Tomcat home\ conf\wrapper.properties" for this setup "C:\Apache-Group\jakarta-tomcat-3.2.3\conf\wrapper.properties" and paste into the same directory. Rename the file "copy of wrapper.properties" to "original wrapper.properties". Open the file "wrapper.properties" in a text editor and make changes to the tomcat_home and java_home directories as needed. For this setup the following changes were made:

wrapper.tomcat_home=<put your Tomcat home> changed to

wrapper.tomcat_home=c:\Apache-Group\jakarta-tomcat-3.2.3

wrapper.java_home=<put your Java home>changed to

wrapper.java_home=c:\jdk1.2.2

Save and close the wrapper.properties file.

Note that the changes just described may vary depending on the location and name of the jdk folder and the location of the tomcat home directory.

 

3.3 Create Tomcat NT Service

Click on the link jk_nt_service to download the Tomcat NT Service executable file "jk_nt_service.exe". When asked, save the file to disk in the "Tomcat home\ conf" directory, for this setup that directory is "C:\Apache-Group\jakart-tomcat-3.2.3\conf" directory.

Open a Command Prompt screen. Navigate to the conf directory under the Tomcat home directory. For this setup, navigate to "C:\Apache-Group\jakart-tomcat-3.2.3\conf". Type the command line as shown below to create the Tomcat NT service:

jk_nt_service -I Tomcat wrapper.properties

From the command line, type "net start Tomcat" to start Tomcat. Go to Control Panel | Services and select the Tomcat service. If the Tomcat service is running, click stop to stop the service. With the Tomcat service selected, click startup. Under startup type make sure that the Automatic radio button is selected. If not, under startup type select the Automatic radio button and click OK.

 

STEP 4. Download, install and configure Apache 1.3.22

4.1 Download and install Apache

This process uses the "apache_1.3.22-win32-x86.msi" file for Apache 1.3.22 installation. Click here, to go to the Apache download site. Download the appropriate Apache 1.3.22 installation file, for this example, "apache_1.3.22-win32-x86.msi." If using Netscape 4.x, a dialog box may appear "Would you like to open this file?" Click "OK" for this dialog box. When asked, save file to disk in the Apache-Group folder created earlier, for this setup "C:\Apache-Group". Double click on the "apache_1.3.22-win32-x86.msi" file to start the installation process. Follow the installation wizard, and set the Network domain, Server name, and Administrator's email address as needed. Use the default "Run as service for all users" as the selected radio button, click next, and select complete install. Change the install folder if desired. For this setup, Apache was installed into the directory "C:\Apache-Group". After selecting the directory for install, click OK, click next and click install. The wizard will install Apache. Click finish to finish the installation of Apache.

Go to Start | Settings | Control Panel | Services select Apache and click stop to stop the Apache service if it is started. With the Apache service selected, click startup. Under startup type make sure that the Automatic radio button is selected. If not, under startup type select the Automatic radio button and click OK.

4.2 Make changes to the Apache file httpd.conf

Copy the file "Apache home\Apache\conf\httpd.conf" for this setup "C:\Apache-Group\Apache\conf\httpd.conf" and paste into the same directory. Rename the file "copy of httpd.conf" to "original httpd.conf". Open the httpd.conf file in a text editor. Add the following as a new line at the end of the file :

Include C:/Apache-Group/jakarta-tomcat-3.2.3/conf/mod_jk.conf-auto

Save and close the file "httpd.conf".

4.3 Download the file mod_jk.dll

Click on the link mod_jk.dll to download the file "mod_jk.dll" to the directory "C:\Apache-Group\Apache\modules". When asked, save the file to disk in the Apache home directory in the modules directory "Apache-home\modules" for this setup, "mod_jk.dll" was saved to directory "C:\Apache-Group\Apache\modules". After downloading, verify that the file "mod_jk.dll" exists in the modules folder.

 

STEP 5: Verify that everything works

Restart the host machine and login. If everything went correctly, both Apache and Tomcat will automatically start as Window NT services. Type in the UNC name of the host machine. If everything is correct, the Apache index page should appear. In the URL line for the browser, type http://host machine/examples, for example http://ARCIMS1/examples. This should bring you to the web page "Index of examples." Click on servlets and execute the "Hello World" servlet. If a web page with the words "Hello World" appears, servlets are running correctly. Next try JSP pages. Go back to " Index of examples" and click on "jsp". Execute the Snoop jsp example. If a web page appears with a bottom line that reads " The browser you are using is (with information on your browser)" jsp's are running properly. That's it, Apache and Tomcat are set-up correctly.

If you experience problems, retrace the steps outlined in this document. Also consult the Apache and Tomcat websites listed at the beginning of this document.