10th September 2007

How To Install Apache Tomcat with IIS 6.0

posted in IIS 6.0 |

Update : The JK2 Connector is no longer supported. I have written an updated guide which you can find here : http://www.iisadmin.co.uk/?p=40

I have also written a guide for installing Tomcat with IIS 7.0 which you can find here : http://www.iisadmin.co.uk/?p=72

System Requirements

For this installation I used the following :

Windows Server 2003 Enterprise Edition

Internet Information Services (IIS) 6.0

Sun Java Runtime JRE 5.0 Update 2

Apache Jakarta Tomcat version 5.5.9

The JK2 Tomcat Web Server Connectors

Note: Previous versions of Tomcat required the Java SDK to be installed. However, as of version 5.5 Tomcat only requires the Java runtime environment. In fact the release notes for Tomcat 5.5.9 say this,

“Tomcat 5.5 is designed to run on J2SE 5.0 and later, and requires configuration to run on J2SE 1.4. Make sure to read the “RUNNING.txt” file in this directory if you are using J2SE 1.4.

In addition, Tomcat 5.5 uses the Eclipse JDT Java compiler for compiling JSP pages. This means you no longer need to have the complete Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment (JRE) is sufficient.”

Install the JRE

Install the JRE and choose a custom installation which will allow you to change the installation directory to D:\java (or C:\Java if you prefer)

Fig.1 Installing the JRE

Select a Custom Installation and click Next

Fig.2 Select a Custom Installation

Choose the target Installation Directory and click OK

Fig.3 Choose the target Installation Directory

When the installation finishes click Finish

Fig.4 Installation Complete

Once this is done you need to set a system environment variable which will enable Tomcat to compile JSP pages at runtime. To do this right-click the My Computer icon, select properties and then the Advanced tab. Then click Environment Variables and under System variables click New.

Fig.5  Setting the Environment Variables

Then add a new system variable with the name of JAVA_HOME and a value of D:\Java (or whichever directory you specified for your Java installation)

Fig.6  Setting the Java Environment Variable

Tomcat also requires a system environment variable to be set so you may as well go ahead and do that whilst you’re here. The Tomcat variable is called CATALINA_HOME and needs to be a system variable which points to the root of your Tomcat installation directory. In this example I am going to install Tomcat into D:\Tomcat so I set the variable accordingly.

Fig.7  Setting the Tomcat Environment Variable

Pages: 1 2 3 4

This entry was posted on Monday, September 10th, 2007 at 2:53 pm and is filed under IIS 6.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

There are currently 22 responses to “How To Install Apache Tomcat with IIS 6.0”

Why not let us know what you think by adding your own comment! Your opinion is as valid as anyone elses, so come on... let us know what you think.

  1. 1 On October 30th, 2007, Vandana Patnaik said:


    Thanks for the note. Which version of Tomcat are you using and which isapi_redirector.dll?
    Any help will be greatly appreciated?

  2. 2 On October 30th, 2007, Paul Lynch said:


    I’m pretty sure it was this one :

    Paul Lynch

  3. 3 On November 2nd, 2007, Bret minnehan said:

    i am setting up apache tomcat on a windows server 2003 system. i am trying to install tomcat because it is needed to run ARC IMS (an internet mapping service). i fallowed your directions but i seem to be getting caught up on the tomcat install. the installer says that it has completed successfully. but then when i go to start tomcat it will not start. i fallowed your directions but i don’t really know whats up.
    thanks again for your direction. they are a great improvement on the documentation that apache has provided.
    any information is great.

  4. 4 On November 13th, 2007, Vandana said:

    You don’t mention using a filter? Did you use one?

  5. 5 On November 20th, 2007, Darren Matthews said:

    Thanks for this, I have followed the instructions but at the moment I’m getting the following error: The HTTP Filter DLL E:\Tomcat\Tomcat 5.5\bin\win32\i386\isapi_redirector2.dll failed to load. The data is the error.

    Not sure what I need to do to resolve this, please can you give me some ideas.


  6. 6 On November 20th, 2007, Paul Lynch said:

    Hi Darren,

    Did you re-boot the machine after the installation ? Also, what are the file permissions on the directory containing the ISAPI DLL ? You could try running Filemon from Sysinternals (now Microsoft) to check for any permissions issues.

    Paul Lynch

  7. 7 On December 3rd, 2007, Chris M said:

    Darren – Check which version of the ISAPI DLL you’re using…

    I was using an old version, and the filter flatly refused to start unless IIS6 is in IIS5 isolation mode.

    Using a more recent version of the DLL and updating the config files enabled me to run it in IIS6 native mode.



  8. 8 On January 13th, 2008, Shin Guey said:

    Thanks for your great tutorial. I am now have my Apache Tomcat running on my IIS 6.0 now. Really appreciate for your good documentation. However, when I follow your instruction, I have some error encounter which waste some time to figure it out.

    1. The isapi_redirector2.reg doen’t work. I create the file and run merge. It only create the key but not the value. I have to manually put in all the registry inside. Still, thanks for your screencast to make me create the same registry.

    2. At first I dunno which JK2 Tomcat Web Server Connectors file to download. I downloaded the isapi_redirect-1.2.26.dll but it doen’t work( I think this could coz by the registry value doesn’t match). I download the correct one base on the url in the comment. Then it works like charm..:)

    3. When I do fresh installation for the Apache-Tomcat. It doesn’t come with the workers2.properties file. I have to create it myself. Here is the file content to run the example:
    info=Ajp13 forwarding over socket


    info=JSP examples, map requests for all JSP pages to Tomcat.



    info=JSP examples, map requests for all JSP pages to Tomcat.


    4. As you said, I really cannot run 2 different Application polls on the same root website. But I already have another web site running on port80 and IIS doesn’t allow me to create another website with port 80. So, I just configure the jakarta website to use the same Application poll and it works. However, I haven’t study on how this will effect the performance.

    Anyway, thanks for the great tutorial. This is the best tutorual I found to configure Apache Tomcat on IIS6.

    Do you have any idea how to use the isapi_redirect-1.2.26.dll? This seem to be newer than isapi_redirector2.dll.

  9. 9 On March 17th, 2008, Quan Tran said:

    I don’t find Application Tool and Web service extension on my WindowXP
    I also installed II6 manager on my machine
    Please help me to config it

    Many thanks

  10. 10 On August 21st, 2008, Zacharias said:

    The whole thing doesn’t work when you use Apache Tomcat 6 with IIS 6(with and without isolation), although the js script seems to do the right job and the ISAPI filter seems to work, there are no desired results, by the way you omit urimapper.properties file from the registry. I ve done so many efforts following your tutorial and the tutorial of onjava and wrox book “apache Tomcat 6 Professional” and i end up with nothinng.

  11. 11 On August 24th, 2008, Will said:

    I’ve created a new application pool like you said, the only difference from the standard ISAPI connector intructions. I still cannot get the connector to work unless I put IIS into IIS 5 Isolation mode. This of course kills other apps I have running that require IIS to be running in 6.0 native mode. I did see that under the new app pool you mentioned creating is a place to change the Identity under the identity tab. Could this be where I need to change users to allow different permissions? Any help would be appreciated getting this to work in IIS 6.0 native mode. Using Tomcat 6.0, ISAPI Redirect 1.2.26, IIS 6.0 on Server 2003.

  12. 12 On August 26th, 2008, Paul Lynch said:


    The walkthrough I put together was aimed specifically at the JK2 connector for Tomcat. Unfortunately, development of that connector has been discontinued and is no longer supported by the Tomcat developers. The instructions for connecting using the JK1.2 connector are slightly different so this tutorial won’t necessarily work correctly if you are using the ISAPI Redirect 1.2.26 with IIS.

    However, after reading your comments I built a new VM to see if I could get ISAPI Redirect 1.2.26 to work with IIS 6 in Isolation Mode and I was able to configure it successfully and get the Tomcat sample applications working. I am planning to put together an updated walkthrough which details the steps required to get the JK1.2 connector working with IIS 6.0 which should hopefully be on the site soon.


    Paul Lynch

  13. 13 On November 5th, 2008, links for 2008-11-05 « Rafael Alcalde Cazorla said:

    […] How To Install Apache Tomcat with IIS 6.0 » IIS Admin Blog (tags: programming) […]

  14. 14 On January 27th, 2009, Kalyan said:

    You mentioned a note below:
    #Note – I have found (through trial and error) that there is either a bug (or a feature) in the JK2 connector which means that its virtual directory cannot exist in a different application pool to its parent web site. I think that this may be why others have suggested that Tomcat doesn’t work with IIS6 in Worker Process mode but that’s not the case, as we shall see…

    Update – If you configure the Jakarta virtual directory to run under a different application pool to its parent web site any requests to that directory will fail and you will see an entry similar to the following in the IIS log files :

    #Software: Microsoft Internet Information Services 6.0

    #Version: 1.0

    #Date: 2005-04-28 14:40:51

    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status

    2005-04-28 14:40:56 GET /jakarta/isapi_redirector2.dll – 80 – Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.2;+.NET+CLR+1.1.4322) 403 18 0

    I am getting same problem in the log file
    what should i do when we get this problem
    Please provide the solution

  15. 15 On January 30th, 2009, Ryan said:

    If you are inserting the registry changes, be sure to stop the tomcat service….it just works if the service is stopped…does not if the service is running!

  16. 16 On February 26th, 2009, Hector said:

    Thks for the tutorial, but i have a problem because when restart the server the IIS and Apache Tomcat dosent work anymore.

    HTTP Error 403 – Forbidden
    Internet Explorer

  17. 17 On March 8th, 2009, Guru, Support Desk- Modulesoft said:

    we have our own dedicated server running Windows 2003 Web Edition withh SP2, IIS
    .net 3.5 and PHP.

    We want to offer JSP Hosting in our server. so what r the softwared i need to install and how to configure so that the existing site will not chaneg and jsp also work .

    please , I ma very concern because we have hosted more then 2000 sites so if anything goes wrong i will be lost.

    kindly consider this . and let me knwo whth proper downlaod version and link and instruction.

  18. 18 On July 12th, 2009, Jason said:


    I would just like to say thank you VERY MUCH for your tutorial. More importantly, your tutorial was the only one that made a reference to Isolation Mode, which is what got my configuration working!

    Thanks again!

  19. 19 On July 21st, 2009, kaizentech said:

    Great instruction. Definitely this will help many technical persons having problem in that field like me.

  20. 20 On February 18th, 2010, Craig said:

    This is a great tutorial, just one thing missing.. SSL and how to make it work between the two apps.

  21. 21 On April 12th, 2010, Cordth said:

    I’ve got everything working great with your instructions. We have two outstanding issues and I need your assistance. We have a code signing cert for the jar files (back on a Linux box) that appears to work well. We have a SSL cert that is properly installed on the IIS…

    Here is the problem,
    non-SSL — everything works great
    SSL — it is not working?

    Do I need to change the ports on the server.xml? Do I need to make changes with other files? I’m not wanting a re-direct, but for all traffic to go via SSL.

    In closing, our application needs to have authentication prior to being launched and we are wanting the SSL cert on the IIS front-end box. After the authentication, all traffic needs to then be SSL secured. I’m 99% confident that putting the SSL cert on the IIS box up front is the way to go, but to then get HTTPS traffic to work has been… puzzeling.

    Thanks for your help/suggestions.


  22. 22 On September 14th, 2010, vinod said:

    I have issue with Tomcat installation i have downloaded latest version 7 and it was the same issue with 5/6 versions also, I am on a Domain to my user i have Administrative permissions, on my mechine it installed properly but when i moved to new meachine with same user with Administrative permission I unable to install tomcat it stops at exe and prompt with alert message
    “Failed to install tomcat 5 service
    Check your settings and permissions
    Ignore is not recommended ”
    Abort Retry Ignore
    Any solutions i googled lot not worked it’s a fresh machine java 6 version variables are aloted.
    zip version works well.
    please provide solution

Leave a Reply

You must be logged in to post a comment.

  • Calendar

  • March 2018
    M T W T F S S
    « Sep