After you have created the worker file, you need to tell IIS which requests
will be serviced by the described worker. This is done by creating a file
named uriworkermap.properties that contains a list of URI patterns mapped
to Tomcat workers. The following listing contains the map for the examples context.

Each of the URI mappings begins with the URI pattern of the request and
the worker with which this pattern should be associated. Our mappings tell
IIS that all static files, JSPs, and servlets in the examples context should
be serviced by the testWorker. Once you have this file created, copy it to
Tomcat's <CATALINA_HOME>/conf directory.

3. Modifying the Windows Registry

In this step, we are going to create the Windows Registry settings that will
be used to point the ISAPI Redirector to our newly-created files.

Note: To add these new registry settings, you will need to use the
Windows REGEDT32.EXE application, which is most likely in your
C:\WINDOWS\SYSTEM32 directory.

Before you can add any of these settings, you must add the following registry
key:

Open the Internet Information Services Application. You should see an
image similar to the following:

Expand your local computer entry, until you see the default Web site

.

Right-click on the default Web site and select Virtual Directory from the New
menu.

Select the Next button and enter the value tomcat in the Alias text
box.

Browse to the directory containing your isapi_redirector.dll file, which
in our case should be <CATALINA_HOME>/conf/ and select the Next button.

Now make sure that you have the permissions set to read, run, and execute.

Now continue through the Virtual Directory Wizard, until you reach the
end and then select the Finish button.

We now need to add the ISAPI Redirector to the default Web site,
so right-click on the default Web site and select the menu item Properties.

Select the ISAPI Filters tab and press the Add button.

Enter a filter name and browse to the location of the isapi_redirector.dll
file. The following image shows the values that I have used in my instance.

Now press the OK button until you are back at the Internet Information
Services dialog.

Testing Your New Configuration

At this point, everything should be properly configured and you can now
test your changes. To do this, you must first start Tomcat and then restart
the IIS server. When both servers are up and running, open your browser to
one of the following two URLs and browse around testing your new integration:

Troubleshooting

1. Double-check the settings in the registry file; they must be entered exactly as they are listed.

2. Make sure the tomcat virtual directory points to the location of the isapi_redirector.dll and the permissions are set to read, run, and execute.

3. Open the ISAPI filters dialog and make sure that the tomcat filter has a
green arrow next to it. If it does not, then check the Executable entry on
the Filter Properties dialog.

4. Make sure the values of your workers.properties and uriworkermap.properties files contain the previously listed values.

5. If you still cannot find the problem, then open the log file <CATALINA_HOME>/logs/jk_iis.log and see if you can diagnose the problem from the ISAPI Redirector's output.

Up Next

That about does it for the basic IIS/Tomcat configuration -- in the next Tomcat
article, I will take another look at server.xml while we configure Tomcat
to receive requests from Apache and the JK2 Connectors.