?

Log in

No account? Create an account
Tomcat ISAPI Filter/Connector and IIS 6 - Nick [entries|archive|friends|userinfo]
Nick

[ website | gagravarr.org ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Tomcat ISAPI Filter/Connector and IIS 6 [May. 4th, 2005|04:25 pm]
Nick
On the Tomcat site, there's 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.

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)
linkReply

Comments:
From: (Anonymous)
2005-05-11 12:09 am (UTC)

Re: Tomcat ISAPI Filter/Connector and IIS 6

The "Web Service Extentions" configuration information is the part I needed to get the Tomcat ISAPI Filter working under IIS 6.
(Reply) (Thread)
From: (Anonymous)
2005-05-12 04:52 am (UTC)

This rocks!

Thanks Nick, this was extremely helpful.
(Reply) (Thread)
From: (Anonymous)
2005-07-20 06:38 pm (UTC)

jkstatus page

All the above is accurate, and I have multiple load-balanced tomcat instances on the IIS6 server. What I can't get with jk1.2 is the blinking jkstatus page to do anything but 404 on me.

Most of the "problems" I encountered in the initial config were permissions "oops". What am I missing here.
(Reply) (Thread)
From: (Anonymous)
2006-07-24 04:42 pm (UTC)

isapi_redirect.dll for 64-bit Win 2003

Do you know if isapi_redirect.dll is available for the 64-bit version of Windows 2003 OS? If so, can you point me to a place I can download it from?

Thanks a lot.
(Reply) (Thread)
From: gagravarr
2006-07-24 04:55 pm (UTC)

Re: isapi_redirect.dll for 64-bit Win 2003

No idea, sorry, don't use 64 bit on windows

I think there are build instructions available, so why not just compile your own?
(Reply) (Parent) (Thread)