How to Setup IIS6 with the Tomcat 5 Connector – Step by Step Guide.
A complete guide step by step with pictures on how to setup Internet Information Server (IIS) 6.0 and Tomcat 5 on a Microsoft Windows 2003 server to use the Tomcat ISAPI redirector.
Prerequisites (installed on test machine)
- IIS (II6 on MS Windows 2003 SP2)
- JAVA Development Kit (jdk1.5.0_09)
- Tomcat (5.5.9)
- Tomcat Connector | Download
Step 1: Add the ISAPI redirect to Tomcat
- Go to D:\tomcat559\bin\ and create a folder ISAPI.
- Copy the Tomcat Connector, isapi_redirect-1.2.26.dll to folder ISAPI.
- Rename isapi_redirect-1.2.26.dll to isapi_redirect.dll
- Go to D:\tomcat559\conf
- Rename uriworkermap.properties to uriworkermap.properties.old to preserve the original settings.
- Rename workers.properties to workers.properties.old to preserve the original settings.
- Create a uriworkermap.properties file with the following contents to test the application:
Note: that to add specific folders that are located in D:\tomcat559\webapps additional lines will need to be added following the same format above.
- Create a workers.properties file with the following contents:
# An entry that lists all the workers defined workers.tomcat_home=d:\Tomcat559 workers.java_home=d:\jdk1.5.0_09 worker.list=worker1 # Entries that define the host and port associated with these workers worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.type=ajp13 #worker.worker2.host=otherhost #worker.worker2.port=8009 #worker.worker2.type=ajp13
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector.0] "extension_uri"="/jakarta/isapi_redirect.dll" "log_file"="d:\\Tomcat559\\logs\\isapi.log" "log_level"="error" "worker_file"="d:\\Tomcat559\\conf\\workers.properties" "worker_mount_file"="d:\\Tomcat559\\conf\\uriworkermap.properties"
- Open IIS Manager
- Go to Web Service Extensions and select All Unknown ISAPI Extensions and press the Allow button. The result is the image below.
- Under Web Site, right click on Default Website. New > Virtual Directory. A wizard will begin, click Next.
- Browse to the appropriate path as we setup in Step 1. In this case D:\Tomcat559\bin\ISAPI.
- Type jakarta for Alias.
Note: That jakarta is under Default Web Site as a virtual directory. In the right pane, the path points to D:\Tomcat559\bin\ISAPI.
- Under Web Site, right click on Default Website. Go to properties.
- Go to ISAPI Filters tab.
- Press the Add button.
- For Filter name: jakarta and Executable: D:\Tomcat559\bin\ISAPI\isapi_redirect.dll. Click OK.
Remember that the uriworkermap.properties file contains a link /jsp-examples/*=worker1 as seen in the image below.
This correlates with the physical location of D:\Tomcat559\webapps\jsp-examples.
Open up your internet explorer and type in the following http://127.0.0.1/jsp-examples/ the result should be favorable.
Tip: That the last / is important to the favorable results. If you type http://127.0.0.1/jsp-examples without the last / you will get a page not found. Thought I would pass that along, as this added additional time to my testing and reconfiguring.
If the preceding result displays JSP Samples then you have successfully configured a IIS >> Tomcat redirector. Done.