|Tomcat ISAPI Filter/Connector and IIS 6
||[May. 4th, 2005|04:25 pm]
document supposedly telling you how to set up the ISAPI filter for IIS. However, it seems a bit short on instructions for newer versions of IIS.On the Tomcat site, there's |
As it turns out, getting it going with IIS 6 is surprisingly easy - much easier than with IIS 4 (which is what the document describes). First up, you need to grab the latest version of the ISAPI filter. This can be found in the Tomcat Connectors download area. Pick "JK 1.2 binary", then "win32". Check the readme for the latest stable version (jk-1.2.10 at the time of writing), then from that directory pick the .exe for the isapi_redirect dll (the .dll is just the filter, while the .exe is the installer). Download and run the setup program.
Once the connector is installed, you need to configure both IIS and the connector. Go to the conf directory in wherever you installed it, and edit workers.properties.minimal. The Tomcat documentation covers this, but for a quick start you can probably leave it as is. One thing to be aware of is that the ajp13 port is different to the http port for tomcat, and if you do enter the tomcat http port then the connector will just time out!
Next up, edit the uriworkermap.properties file. Again, the Tomcat docs do cover this, but basically just list all your tomcat contexts that you want exporting, bound to the worker defined in the previous file. See the docs for complex exclusions etc.
Now, you need to tell IIS about the filter. The installer has probably set up a broken filter on your default website, so pick properties, then ISAPI filters, and remove the "jakarta" one (pointing to the filter dll). Before you can add it properly, it needs to be listed as an allowed extension. Go to "Web Service Extentions", and add it as a new extension (give it any name you want, the executable is the DLL that was installed, and be sure to tick the allowed box).
Finally, you can go and add it properly to your sites. For each site to support tomcat, pick properties then ISAPI filters, and add the DLL (with any name you want). With that done, create a new virtual directory in the root of your site. It needs to be called "jakarta", point to the ISAPI filter bin directory, and be given read and execute permissions. You should be able to browse to <website address><tomcat context>, and see your tomcat pages through IIS.
(If you get a 404, then one of the ISAPI filter isn't registered for the site, or you haven't defined that context in the connector config, or you haven't set up the jakarta virtual directory with execute permissions. After changing the connector config, you'll need to restart IIS, or at least the web server part of it. If you get timeouts / service unavailable, check you've entered the right ajp13 port in the worker config)