• IIS Admin Blog

  • How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector

5th June 2009

How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector

posted in IIS 7.0, Tomcat |

Some time ago I wrote an installation guide for Apache Tomcat and IIS 6.0 using the JK 1.2 connector which you can find elsewhere on this blog. However, in response to a number of questions and comments on my blog and IIS forums I have decided to write a new installation guide for Apache Tomcat using the latest release of the JK 1.2 connector and IIS 7.0.

Update : I have also written a guide for installing Tomcat with IIS 7.0 on Windows Server 2008 using the IIS Application Request Routing (ARR) module which you can find here : http://www.iisadmin.co.uk/?p=326

For the purposes of this guide I have used Java Runtime Version 6 Update 13, Apache Tomcat 6.0.18 and the JK 1.2.28 Connector.

You can download the software used in this guide here :

Java Version 6 Update 13
http://www.java.com/en/download/manual.jsp

Apache Tomcat
http://tomcat.apache.org/download-60.cgi

Tomcat Connectors (mod_jk) Downloads
http://tomcat.apache.org/download-connectors.cgi

Start by installing the Java runtime and accept the license agreement.

Then change the installation target folder to C:\Java and then click OK and wait while Java installs

Once you have installed Java you can start installing Tomcat. Double-click the apache-tomcat-6.0.18.exe file to invoke the Apache Tomcat Setup Wizard.

Choose a Custom installation and ensure that the Examples are selected as shown here. You wouldn’t necessarily want to install the sample applications in a production environment but we will be using them in this walkthrough so we need to install them.

Select to install Tomcat in the C:\Tomcat folder as shown here.

Once you have chosen the install location click Next.

Leave the default HTTP/1.1 Connector port set to 8080 and choose a password for the admin account.

The setup wizard should find your Java installation automatically.

Click install and wait while Tomcat setup completes.

When the installation is complete click Finish.

Pages: 1 2 3

This entry was posted on Friday, June 5th, 2009 at 2:34 pm and is filed under IIS 7.0, Tomcat. 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 107 responses to “How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector”

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 June 16th, 2009, Ryan said:

    I have reviewed this document several times (How To Configure IIS 7.0 and Tomcat with the JK 1.2 Connector) and have configured my server exactly as laid out in this document. Everything is working except for the JK 1.2 connector. : {
    I have used Process Monitor from sysinternals.com and the ISAPI filter is not being hit. Also isapi_redirect.log file is not being created.

    Any additional advice that you can share?
    Thanks,
    Ryan

  2. 2 On June 18th, 2009, Paul Lynch said:

    Ryan,

    When you say the ISAPI filter is not being hit what exactly do you mean ? Is there an Access Denied error in Process Monitor ? What do you see in your browser ? Is it a 404 from IIS ? If so you may not have configured Tomcat correctly. Check that your Tomcat .properties files are present and correct.

    Regards,

    Paul Lynch

  3. 3 On June 22nd, 2009, Ryan said:

    Hi Paul
    Yes, I am receiving a 404 from IIS. I am not seeing isapi_redirect ever being accessed when watching file activity via Process Monitor.
    In previous versions of IIS you could see the green up arrow when an isapi filter loaded correctly. With IIS 7 this feature is not available. Using the command tasklist /m is* shows that the only module loaded is isapi.dll

    I can hit the tomcat instance directly by hitting the :8080 port. I receive a 404 file not found error when attempting to hit tomcat via the isapi_redirect and IIS7.

    Any assistance is much appreciated.
    Thanks,
    Ryan

  4. 4 On June 23rd, 2009, Ryan said:

    I was able to finally configure the modjk isapi filter to load for IIS 7.
    Addtional requirements that I had to make above and beyond what is in this document are.
    1. IIS 6 Metabase Compatibility is a required Role Service.
    2. Only works with the AMD64 isapi_redirect.dll…..even though I have Intel processors on my server.

  5. 5 On June 30th, 2009, Uko said:

    Ryan,
    Could U pls explain a little on what u mean by:
    “1. IIS 6 Metabase Compatibility is a required Role Service.
    2. Only works with the AMD64 isapi_redirect.dll…..even though I have Intel processors on my server.”

    I think I’m in the same situation.

  6. 6 On July 1st, 2009, Uko said:

    My configuration hasn’t worked yet!
    I’ve been getting:
    “No worker maps defined for C:\Tomcat\Tomcat 6.0\conf\uriworkermap.properties”
    when I check the log.

    Does anyone have an idea on how this can be fixed?

  7. 7 On July 1st, 2009, Kiran Prakash said:

    I ‘ve the “IIS 6 Metabase Compatibility” enabled. I am using amd64 bit, but still get the same error. Any idea?

  8. 8 On July 7th, 2009, Paul Lynch said:

    @Ryan,

    I’ve just checked my test server and I don’t have the IIS 6 Metabase Compatibility Role Service installed, so it can’t be required for Tomcat to run on IIS 7.0 I’m afraid.

    Also, the AMD64 name actually refers to the architecture of the chip not the name of the manufacturer, i.e AMD64 refers to 64-bit chips as opposed to Itanium chips.

    Regards,

    Paul Lynch

  9. 9 On July 25th, 2009, Florian Rhomberg said:

    Hi!
    I also used your How To to configure Tomcat on Windows 2008 x64. I did all steps but now I have a similar error like the others above. If I try to access tomcat on 8080 everything ist working. If I try to use the IIS 7.0 I get also 404.0 Error. If I use the command of Ryan the command line shows me isapi.dll as well as isapi_redirect.dll therefor it seems that both are loaded.
    Has someone an idea to fix it?

    Florian

  10. 10 On July 25th, 2009, Florian Rhomberg said:

    Hi!
    I got it work. Instead of the isapi_redirect.properties I inserted the values into the regitry following the steps provided on this page (Configuring the ISAPI Redirector): http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html

    I do not know why it doesn´t work with properties file but however thank you for the tutorial!

    Florian

  11. 11 On July 28th, 2009, khairaz said:

    I followed the tutorial and having the same problem (404 error). But i solved it with make some changing in uniworkermap.properties. I added my web address examples /jsp-examples/*=wlb below the /examples/*=wlb and its worked perfectly.

  12. 12 On September 7th, 2009, Eric said:

    I followed the tutorial step by step to configure Tomcat 5.5 with IIS 7 on Windows Server 2008 Standard French Edition.
    Like many people here, I can hit the tomcat instance directly by hitting the :8080 port. I receive a 404.3 file not found error when attempting to hit tomcat via the isapi_redirect and IIS7 on standard 80 http port.
    I use the command of Ryan and the command line shows me isapi.dll as well as isapi_redirect.dll therefore it seems that both are loaded, but isapi_redirect.log file is never being created.
    Quick fix appreciated.

    Eric

  13. 13 On September 9th, 2009, Binesh said:

    Do you have any solution windows 2008 64 bit & tomcat 5.5 32 bit for configuration

  14. 14 On September 11th, 2009, John said:

    Hi Paul,

    I think I’ve figured out what the issues are that some people are having. If you are running a 32 bit version of Tomcat with a 32 bit JK connector on an x64 OS you have to configure the Application Pool -> Advanced Settings -> Enable 32 bit Applications = TRUE. You also need to ensure that the NTFS permissions are set for the user defined by Identity. You may want to add these to your post. I have documented it on my post at hidi.no-ip.org.

    -john

  15. 15 On September 22nd, 2009, himanshu said:

    thanks a ton! it worked just has to add properties value in registry.
    still need to figure out how to use Request.ServerVariables(”LOGON_USER”) from a asp page, get username in jsp page
    if anyone has example please forward me.

  16. 16 On October 7th, 2009, Alexander said:

    Binesh,

    you need to create a new application pool process, running in 32bit mode

  17. 17 On November 8th, 2009, Dennis said:

    I am just starting this process for both MS XpPro 64 and Windows 7 Ultimate 64. I will post my results as I go. I am wondering with 64 bit versions of Tomcat 5.x available and easy to install whay others are using 32 bit compiles under a 64 bit O.S.? Anyway, here I go!

  18. 18 On November 9th, 2009, Q said:

    I have win2k8 IIS7 Tomcat 5.5(shows up under WOW6432) have gone thru all steps and remedies but still not able to get any work between the redirector. tomcat working fine on its own. Have tried both registry option and properties option for connector config.

    tasklist /m is* doesnt show anything. Is there any other troubleshooting step I can do? seems like connector is not pickedup by IIS7 at all.

    I have tried disabling UAC didnt help.

  19. 19 On November 9th, 2009, Dennis said:

    Ok, I did everything perfectly as others have done (giggle) here is results from my first attempt. Just adding this to assist others who may be trying this and have gone down the same path as I did, the wrong path, right?

    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed

    Module IIS Web Core
    Notification Unknown
    Handler StaticFile
    Error Code 0×800700c1
    Requested URL http://localhost:80/servlets-examples/helloworld.html
    Physical Path C:\inetpub\wwwroot\servlets-examples\helloworld.html
    Logon Method Not yet determined
    Logon User Not yet determined

    Log file report: (goggledegook)
    #Software: Microsoft Internet Information Services 7.5
    #Version: 1.0
    #Date: 2009-11-09 12:49:36
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2009-11-09 12:49:36 ::1 GET /servlets-examples/helloworld.html - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+Win64;+x64;+Trident/4.0;+GTB6;+.NET+CLR+2.0.50727;+SLCC2;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET+CLR+3.0.30618;+.NET+CLR+3.5.21022;+Media+Center+PC+5.0;+SLCC1) 500 0 193 6267 493 202

    I will be going over all of the repair attempts other have applied now.
    Dennis in Camarillo California

  20. 20 On November 9th, 2009, Dennis said:

    Ok, I post here the three files the OP showed as screenshots which you could not cut and paste from. This is so you will not have to type in again. May be an error so check carefully.

    ===============================================

    #worker.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #
    worker.list=wlb,jkstatus,oreka
    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #
    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009
    #
    # Now define a load balancer
    #
    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w
    #
    # Define a status Worker
    #
    worker.jkstatus.type=status

    ======================================

    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [url]=[worker name]
    #

    /admin/*=wlb
    /manager=*=wlb
    /examples/*wlb
    /servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    #mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ==========================

    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    #Full path to the log file for the ISAPI redirector
    log_file=c:\tomcat\logs\isapi_redirect.log

    # Log level (debug, info, warn, error or trace)
    log_level=info

    #Full Path to the worker.properties file
    worker_file=c:\tomcat\conf\workers.properties

    # Full path to the uriworkermap.properties file
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

  21. 21 On November 9th, 2009, Dennis said:

    Ok, I changed the isapi dll file from isapi_redirect-1.2.28 IA64.dll to isapi_redirect-1.2.28 AMD64.dll as others had suggested above. Now error is different!

    HTTP Error 500.0 - Internal Server Error
    Calling GetFilterVersion on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed

    Detailed Error Information
    Module IIS Web Core
    Notification Unknown
    Handler StaticFile

    Error Code 0×80070002
    Requested URL http://localhost:80/servlets-examples/helloworld.html
    Physical Path C:\inetpub\wwwroot\servlets-examples\helloworld.html
    Logon Method Not yet determined
    Logon User Not yet determined

    - Before error was “unable to load” code 800700c1 and now it is 800770002 - “Calling GetFilterVersion on ISAPI filter failed”. Hmmm… seems like it now loads the isapi dll but doesn’t like it for some reason.

  22. 22 On December 10th, 2009, ds said:

    Dennis:

    I get the same HTTP error 500.00/0×80070002, did you find a solution to this?

  23. 23 On December 23rd, 2009, Florian said:

    Hi!
    I want to thank you for this Tutorial as well as for the tutorial of IIS6 it works great and it helped me to install several Tomcatserver in the past.

  24. 24 On January 8th, 2010, Chris Bedford-Gay said:

    Hi, excellent article.

    Worked for me perfectly until I tried to setup this is a site not the default. It worked up until the point I changed from using “localhost” to a host file mapped to “dev.rms” 127.0.0.1 with the IIS being setup to handle this.

    As soon as I tried this I received a error:

    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Program Files\Apache Software Foundation\Tomcat 5.5\ISAPI\isapi_redirect.dll” failed

    Does anyone have any ideas about this. I’m running 2008 Server x64 in 32bit compatability mode. I’ve 6 other sites running fine but no ideas about this error that seems to be specific to the ISAPI in Tomcat.

    Help please.

    Chris.

  25. 25 On January 11th, 2010, mohammad said:

    ok the solution for this error:
    HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Program Files\Apache Software Foundation\Tomcat 5.5\ISAPI\isapi_redirect.dll” failed

    is:
    go to default application pool
    and to advance setting
    then to enable 32 bit application set it to true and test again.

  26. 26 On January 11th, 2010, Chris Bedford-Gay said:

    As soon as I do that i get a 404.0 file not found error. Most frustrating.

  27. 27 On January 21st, 2010, Steve Priestley said:

    It seems as though there are a couple of typos in the .properties files previously posted that lead to either a HTTP 500 error or a 404 error (depending upon which of the two files are read). Here are the amended versions that I’ve got running on my IIS 7.5 Windows 7 machine that seem to work fine:
    ———————–
    uriworkermap.properties
    ———————–
    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [URL]=[worker name]
    #

    /admin/*=wlb
    /manager/*=wlb
    /examples/*=wlb
    #/servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    # Mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ——————
    workers.properties
    ——————
    # workers.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #

    worker.list=wlb,jkstatus

    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #

    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009

    #
    # Now define a load balancer
    #

    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w

    #
    # Define a status Worker
    #

    worker.jkstatus.type=status
    ———————–

    No registry hacking required either….

  28. 28 On February 5th, 2010, RAM said:

    Hi All,

    I am able to access “hello world” in the above document. i want it to be accessed only from IIS using port 80 so the request will be handled by IIS.

    I dont want the “helloworld” to be accessed by “localhost:8080/…/ ../helloworldexample”

    I want that to be accessed only by “localhost/…/…/helloworldexample”

    can Any one help me on the same.

    Thanks

  29. 29 On February 10th, 2010, Pieter Degraeuwe said:

    Hi,

    I followed the steps just like you nicely described.
    It works -almost-.

    I can see in de isapi_rederect.log the following:

    (I skipped the beginning)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 0: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 1: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 2: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker wlb
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ‘lb’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 3: wlb of type lb (5)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (116): found a worker jkstatus
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_worker.c (293): Found worker type ’status’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (512): Checking extension for worker 4: jkstatus of type status (6)
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (171): uri map dump after extension stripping: index=0 file=’c:\java\tomcats\conf\uriworkermap.properties’ reject_unsafe=0 reload=60 modified=1265835848 checked=1265836550
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (176): generation 1: size=5 nosize=0 capacity=8
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/servlets-examples/* worker=wlb context=/servlets-examples/* source=uriworkermap type=Wildchar len=20
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #1: uri=/examples/* worker=wlb context=/examples/* source=uriworkermap type=Wildchar len=11
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #2: uri=/manager/* worker=wlb context=/manager/* source=uriworkermap type=Wildchar len=10
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #3: uri=/admin/* worker=wlb context=/admin/* source=uriworkermap type=Wildchar len=8
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (186): NEXT (1) map #4: uri=/jkmanager worker=jkstatus context=/jkmanager source=uriworkermap type=Exact len=10
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (482): Switching uri worker map from index 0 to index 1
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [info] jk_isapi_plugin.c (2572): Jakarta/ISAPI/isapi_redirector/1.2.28 initialized
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1841): Filter started
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (1036): Attempting to map URI ‘/localhost/jkmanager’ from 5 maps
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/servlets-examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/manager/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/admin/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/jkmanager=jkstatus’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/servlets-examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/examples/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/manager/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/admin/*=wlb’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (850): Attempting to map context URI ‘/jkmanager=jkstatus’ source ‘uriworkermap’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_uri_worker_map.c (873): Found an exact match ‘/jkmanager=jkstatus’
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1922): check if [/jkmanager] points to the web-inf directory
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1938): [/jkmanager] is a servlet url - should redirect to jkstatus
    [Wed Feb 10 16:15:50.635 2010] [1560:784] [debug] jk_isapi_plugin.c (1978): fowarding escaped URI [/jkmanager]

    –> But I still get a 404. So it seems that i can’t find the tomcat to forward to.

    netstat -a shows that my tomcat IS listening on port 8009.

    Any suggestions ?

  30. 30 On February 11th, 2010, Paul Lynch said:

    @Pieter,

    What is the sub-status code in your IIS log file ?

    Regards,

    Paul Lynch

  31. 31 On February 11th, 2010, Pieter Degraeuwe said:

    I don’t know if this might help , but this I could find in the log….

    (Thanky you VERY much for your reply, since I’m desperate…)

    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:34:57
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken

  32. 32 On February 11th, 2010, Pieter Degraeuwe said:

    @Paul,

    I think I lost some lines… here is a bit more…

    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:29:17
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2010-02-11 11:29:17 ::1 GET /examples/jsp/jsp2/el/basic-arithmetic.jsp - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 143
    #Software: Microsoft Internet Information Services 7.0
    #Version: 1.0
    #Date: 2010-02-11 11:34:57
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2010-02-11 11:34:57 ::1 GET /examples/jsp/jsp2/el/basic-arithmetic.jsp - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729) 404 0 2 147

  33. 33 On February 11th, 2010, Paul Lynch said:

    @Pieter,

    Your log file appears to indicate a standard 404 error which suggests that IIS is not handing off the requests to the ISAPI filter. IIS is looking for a resource (in this case /examples/jsp/jsp2/el/basic-arithmetic.jsp) and can’t find it so returns a 404

    The only thing I can suggest is that the Tomcat connector isn’t installed and/or configured correctly because it isn’t intercepting the requests properly.

    Regards,

    Paul Lynch

  34. 34 On February 11th, 2010, Pieter Degraeuwe said:

    Thanks again for your help.

    When you say tomcat connector, you mean the isapi_rederect (jk), or the thing that listens on port 8009 ?

    Or, am I completely missing the real tomcat connector? (and i forgot to install it?)

    goal is that I have a set of a few tomcats, that are grouped by the one IIS.
    the urimapping.properties contains the config to decide which request go to worker1 and which go to worker2?

    Does have iis another way of configuring this? (forwarding), since I might need this as well for my subversion repositories.

    Thanks

  35. 35 On February 11th, 2010, Paul Lynch said:

    Pieter,

    Yes I mean the ISAPI filter. It has to be configured and enabled in IIS in order to be able to hand off requests to Tomcat.

    Regards,

    Paul Lynch

  36. 36 On February 24th, 2010, Semax said:

    Hullos`

    thanx for the tutorial. I have followed it and everything works fine but just one problem. My application appears very well when am accessing it from the remote server and ip address i used but isn`t accesible from other computers/ip on the internet. i.e.
    http://trackafrica.com is accessible even from other ip addresses, but http://trackafrica:8080 (and http://trackafrica:8080/track ) isn`t accessible from other ip addresses apart from the one i used.

    What could i have missed or what i am i supposed to do to get this done.

    Will be happy to receive a response
    regards

  37. 37 On February 25th, 2010, Semakula said:

    I have installed a java application using tomcat 6 and iis7, ISAPI connector jk 1.2.xx.

    The app is working fine on the remote server i used but doesn`t display when accessed from other computers on the internet. i.e. http://trackafrica.com displays well both on the server and other computers, but http://trackafrica.com:8080 (http://trackafrica.com:8080/track/Track) won`t display when accessed from other computers on internet.

    I am puzzled as to why this is like this.

    I will be glad to receive a clue or solution to this.

    Thanx

  38. 38 On February 25th, 2010, Theodore said:

    Hello everyone, I too get a 500 error: even in the Default Site (http://localhost)

    I am running on a Windows Server 2008 x64 virtual machine with IIS 7.5.

    All in all, I did the following:
    1. Got the amd64 filter, renamed it properly and unblocked it.
    2. Created workers.properties and uriworkermap.properties
    3. Tried the isapi_redirect.properties thing, the filter could not be loaded so:
    3.1 Tried the registry thing instead
    4. Installed IIS with CGI, ISAPI Extensions and ISAPI Filters
    5. Created virtual directory and tested the connection with the default user (did not work, so I had to declare the admin passwd which passed the test)
    6. In that virtual dir, edited the handler mapping
    7. Added the isapi filter to the default web site
    8. Added the isapi and cgi restriction things pointing to the dll

    After restarting the server I get nothing more than:

    HTTP Error 500.0 - Internal Server Error
    The page cannot be displayed because an internal server error has occurred. Detailed Error Information
    Module IsapiFilterModule
    Notification AuthenticateRequest
    Handler StaticFile
    Error Code 0×80070001
    Requested URL http://localhost:80/
    Physical Path C:\inetpub\wwwroot
    Logon Method Anonymous
    Logon User Anonymous

    Since I have been messing with this for more than a week now, I would like to know:

    Is there ANYONE that has set this up successfully?

  39. 39 On February 25th, 2010, Theodore said:

    Just to be complete regarding my previous post, the registry entries are read fine, the log file is created ok and shows no errors whatsoever…

    I feel inclined to take this personally, it’s a pity that there is no definite answer in the web for this issue. If there is someone that knows something chip in guys so that we get this straightened out once and for all, this would help a lot of people out there I think…

  40. 40 On February 25th, 2010, Theodore said:

    Follow-up just to note that if I change the 32-bit compatibility thing to True I do see the welcome screen in localhost but then my site (that resides on a remote server) returns a 404 error (I’ve also read this in Chris’ comment).

  41. 41 On February 27th, 2010, Larry said:

    hi,

    i replace isapi_redirect.dll with AMD, and it worked!
    no need to enable “the 32-bit compatibility”
    “Metabase Compatibility with IIS 7.0″ is installed, but i don’t know if it related with the issues.

  42. 42 On March 1st, 2010, daniel said:

    if you get 500 GetFilterVersion - first of all check the names/extentions of your properties files.

  43. 43 On March 5th, 2010, som said:

    Thanks, good rewiew everything is working.

    Just a question:
    Can I increase java heap memory size?
    If yes, How can i do it?

  44. 44 On March 8th, 2010, Theodore said:

    Guys, since I see that this is working for some of you, can somebody post a worklog here in order to compare and see what causes the problem on my installation?

    TIA.

  45. 45 On March 9th, 2010, Brus-Per said:

    I just wanted to say thanks for this excellent tutorial. The only problem I had was with the (almost) famous AMD64 isapi_redirect.dll. Probably, a lot of the problems reflected above arises from misinterpreting the folder structure under /dist/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.30. Once again, thank you for sharing this information!

  46. 46 On March 9th, 2010, Brus-Per said:

    BTW, I think there is a typo in the posting from Dennis on November 9th.

    The posting reads:
    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    The correct extension_uri should probably be:
    extension_uri=/jakarta/isapi_redirect.dll (the first “r” in jakarta should not be there)

  47. 47 On March 9th, 2010, David Ha said:

    I got IIS re-direct to Tomcat just fine, but problem arise when I try to work with SSL. For some reasons, the redirect change the url from https://domainname.. to http://Domainname..:443

    Server; Windows Server 2008 x64
    Tomcat connector: 1.28

    on my W2K3 server - it works beautifully.

    Any helps is appreciated.

  48. 48 On March 17th, 2010, Ali Alan said:

    all of works but in my project there are 3 domains in same application folder

    webapps/folder1/app1/
    webapps/folder1/app2/
    webapps/folder1/app3/

    is there any way show URL without folder name.
    Ex.

    http://www.domain1.com/folder1/app1/index.jsp — work
    i want to work http://www.domain1.com/index.jsp

    http://www.domain2.com/folder1/app2/index.jsp — work
    i want to work http://www.domain2.com/index.jsp

  49. 49 On March 21st, 2010, Kev said:

    Nice Blog, I have used it as a template for my own system.
    I have Server 2008 standard running IIS7 and Tomcat 6
    IIS has been running well for a while and a few ASP.Net web sites are hosted there, I am now trying to get a Java site running as well.
    The Domain (www.spicetheworld.eu) points correctly to my server and currently shows my IIS Servers default web page.
    I have followed your instructions and I am currently at this point -
    http://www.spicetheworld.eu/ reaches IIS but does not foward to Tomcat
    Over the Server both http://localhost:8080/spicetheworld/ and http://localhost/spicetheworld/ show the installed site correctly.

    I suspect the answer to this is simple so how do I get IIS to foward incoming requests to view the website to Tomcat please?

    This is my workers.properties file
    worker.list=wlb,jkstatus
    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009
    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w
    worker.jkstatus.type=status

    This is my uriworkermap.properties file
    /admin/*=wlb
    /manager/*=wlb
    /spicetheworld/*=wlb
    /jkmanager=jkstatus

    This is my isapi_redirect.properties file
    extension_uri=/jakarta/isapi_redirect.dll
    log_file=c:\tomcat\logs\isapi_redirect.log
    log_level=info
    worker_file=c:\tomcat\conf\workers.properties
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

    In IIS I have configured the Default Web site as in this Blogg and I have not added spicetheworld.eu as a web site (is this correc?)

    Thanks in advance for any advise.

    Regards

    Kevin

  50. 50 On April 13th, 2010, Mark said:

    I am using the 64 bit Windows 2008, the 64 bit 1.2.28 connector, the 64 bit tomcat 6.0.26 running on 64 bit jdk 1.6.0_19. I followed the instructions and had same problem most were experiencing. That is that everything worked except the connector. Using the tasklist utility also showed that the isapi_redirect.dll was not running, and the log file was not getting created.

    My solution suggested that isapi_redirect.dll did not have correct access rights to the directory containing the config file nor to the directory containing the log file. This completely prevented to connector from loading. Although I don’t understand why this would be so since both IIS and Tomcat are running as System and they don’t have any problems reading or writing files.

    Maybe this is why the setup started working for some when they used the registry settings for the config info since this did not require access rights to a disk resource.

    My solution was to give Everyone Modify level rights to the directory with the isapi_redirect.properties file and the directory which is the target of the log file.

  51. 51 On April 27th, 2010, Steve said:

    Thanks for this blog, it was very helpful.

    I am testing this on Windows 7 Enterprise (moving it to Server soon), IIS 7.5.7600.16385, Tomcat 6.0.26 and isapi_redirect.dll version 1.2.30.

    After following the steps and making the changes to properties files so that they end up like this (AND RESTARTING THE TOMCAT SERVICE AND IIS!) everything worked beautifully:

    ———————–
    uriworkermap.properties
    ———————–
    # uriworkermap.properties - IIS
    #
    # This file provides sample mappings for example wlb
    # worker defined in workermap.preoperties.minimal
    # The general syntax for this file is:
    # [URL]=[worker name]
    #

    /admin/*=wlb
    /manager/*=wlb
    /examples/*=wlb
    /jsp-examples/*=wlb
    #/servlets-examples/=*wlb
    # Optionally filter out all .jpeg files inside tha context
    # For no mapping the url has to start with exclamation (!)

    #!/servlets-examples/*.jpeg=wlb

    #
    # Mount jkstatus to /jkmanager
    # For production servers you will need to
    # secure the acces to the /jkmanager url
    #
    /jkmanager=jkstatus

    ——————
    workers.properties
    ——————
    # workers.properties file
    #
    #This file provides jk configuration properties needed to
    #connect to Tomcat
    #
    # The workers should create and work with
    #

    worker.list=wlb,jkstatus

    #
    # Define a worker named ajp13w and of type ajp13
    # Note that name and type do not have to match
    #

    worker.ajp13w.type=ajp13
    worker.ajp13w.host=localhost
    worker.ajp13w.port=8009

    #
    # Now define a load balancer
    #

    worker.wlb.type=lb
    worker.wlb.balance_workers=ajp13w

    #
    # Define a status Worker
    #

    worker.jkstatus.type=status
    ———————–
    ==========================

    # Configuration file for the Jakarta ISAPI Redirector

    # The Path to the ISAPI Redirector Extension, relative to the website
    # This must be a virtual directory with execute privileges
    extension_uri=/jarkarta/isapi_redirect.dll

    #Full path to the log file for the ISAPI redirector
    log_file=c:\tomcat\logs\isapi_redirect.log

    # Log level (debug, info, warn, error or trace)
    log_level=info

    #Full Path to the worker.properties file
    worker_file=c:\tomcat\conf\workers.properties

    # Full path to the uriworkermap.properties file
    worker_mount_file=c:\tomcat\conf\uriworkermap.properties

  52. 52 On April 30th, 2010, Joe said:

    Thank you, I was racking my brains out for three days and nights
    All I was missing the last step….

    thanks again!

  53. 53 On June 12th, 2010, Mikael said:

    Hi

    I have followed the instructions and i now have a working IIS7 - Tomcat installation on a Win2008 server.

    But i have one problem that is hard to see any logic behind.

    If i run a web browser locally on the server all .jspx pages are shown correctly, BUT when i use an external browser all pages containing forms that require information gets a “500 - Internal server error.There is a problem with the resource you are looking for, and it cannot be displayed.”, the errorpage shows up when i leave the fields in the forms empty and click “log in”, or if i type in wrong information, for example a non existent user in the user field.

    It looks like IIS lacks information on how to call the right page when there is no or wrong info missing in fields.

  54. 54 On June 15th, 2010, JB said:

    Hi,
    I’ve configured IIS7 and Tomcat6 successfully, being able to see servlets i’ve made on both localhost:8080 and localhost:80.
    Now i want to add the servlets to my website.
    I tried following the same steps, except making a virtual directory under my website rather than “default web site”, but i get 404 file not found errors.
    How do i go about doing this?
    Thanks

  55. 55 On June 18th, 2010, Brijesh said:

    I tried the same steps mentioned in the tutorial, but no success.

    both(IIS and apache) are working independently, but not getting redirected to apache from IIS.

    getting 404 and displaying path of ISS home directory.

  56. 56 On June 28th, 2010, Steele said:

    Just like Brijesh, I followed all steps. Win 2008, IIS 7.5 and tomcat 6 on another machine. I just get 404 error, no log file gets generated which makes me believe that IIS is not even picking up the DLL. Not sure what to fo.

  57. 57 On June 29th, 2010, Brijesh said:

    I tried to configure the same in the virtual enviornment, it worked but on real server,
    it still giving me 404.

    On real server when i do “tasklist /m is*”
    it gives me
    Image Name PID Modules
    ========================= ======== ==========================
    inetinfo.exe 504 ISATQ.dll, iscomlog.dll
    InetMgr.exe 6988 ISymWrapper.dll
    vds.exe 8700 iscsidsc.dll, ISCSIUM.dll

    and when i execute the same command on virtual server

    it gives me

    Image Name PID Modules
    ========================= ======== ===============================
    w3wp.exe 2424 isapi.dll, isapi_redirect.dll

    i am not sure what i am missing, i have double checked all the steps still no success yet.

  58. 58 On June 29th, 2010, Steele said:

    Finally got it to work. I reverted the IIS install and tried again. This time it worked. The only thing I did differently was when you named your filter tomcat, I named mine modjk which didn’t work. Second time around I named it tomcat and it worked. Weird.

  59. 59 On June 30th, 2010, Sonu said:

    I integrate tomcat 6 with iis 7 and follow the same steps.

    Every thing is working fine for localhost and default website.

    I want to add more than 3 website in tomcat and want to run on tomcat but as i add new website to iis and follow same steps as for default one all html pages are accessed but JSP and servlets portion is not executed by tomcat.

    Error Shown is

    HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    Kindly tell where to add and what to add so that multiple website can run on tomcat and iis.

  60. 60 On July 9th, 2010, venkatesh mani said:

    hello sir,

    when i installed the tomcat i not gave user name password, when i entered in to the tomcat fot the login i gave the default user name password. and also i uncommented the user name password. now i am getting “page cannot be displayed” problem. please solve my probelm it is very urgency

  61. 61 On August 3rd, 2010, Ger said:

    Hi

    Excellent work on the instructions, thank you. I’m getting the following error “HTTP Error 500.0 - Internal Server Error
    Calling LoadLibraryEx on ISAPI filter “C:\Tomcat\ISAPI\isapi_redirect.dll” failed”

    IIS 7 on Windows 2006 64 Bit on VM.
    Tomcat 6 on a remote machine.

    Any suggestions appreciated. Also do I need to open port 8009 for teh work thread. There is a firewall between IIS and Tomcat.

  62. 62 On August 3rd, 2010, Ger said:

    Quick update. I found I needed the AMD64 ISAPI DLL which resolved the issue with the ISAPI filter not loading. I now assume all I need to do is get port 8009 open?

  63. 63 On August 11th, 2010, Elrinth said:

    tasklist /m is* gives me nothing. it’s not even using the isapi :(

  64. 64 On August 12th, 2010, Elrinth said:

    Windows 7 Pro 64bit
    IIS 7.5
    .NET 2.0 or .NET 4.0
    Tested with 32bit, 64bit amd, 64bit intel version of isapi_redirect.dll
    Tested with/without enabling 32bit (disabling results in error 500, enabling results in error 404)
    Writing something wrong in any of the config files results in a created isapi_redirect.log inside the log folder telling me what’s wrong.
    Still 404

    How to fix?
    I’ve tried everything above.

  65. 65 On August 12th, 2010, Paul Lynch said:

    @Elrinth,

    I’m looking into the issues with 64-bit builds at the moment. A lot of people seem to be having problems with Tomcat on a 64-bit platform.

    Regards,

  66. 66 On August 13th, 2010, Stefan said:

    Finally get IIS to talk to tomcat. I am using IIS 7.5, tomcat 6.0.29 and isapi-redirect-1.2.30.dll. The OS is 64-bits. I use all amd64 bit version to match the OS. When 32-bits version was used, I was getting a 404.3 error. I also stupidly did not follow the instruction above to remove the version from my dll to isapi-redirect.dll. I got a 505 status code, with error message stating something wrong when calling getFilterVer(). At this point, tasklist /m is* shows that the isapi-redirect.dll is loaded and the redirect.log shows up, but the browser prompt me to save the file when testing. This is fixed by fixing the ISAPI-dll Handler Mapping of the site. The Executable was pointing to the 32-bit dll. After switching back to the 64 bit dll and checking Executable under the Access tab in the dialog shown after Request Restriction is clicked, the test page finally work.

    I also manage to get the 32-bit dll to work by changing the Application Pool Advanced Setting Eable 32-bit Application to true.

  67. 67 On August 17th, 2010, Xabier said:

    I was going through this nice manual and thought I would never make it work.

    Despite of some problems with access rights I got to have something written on the isapi.log. This was the first step to realise that I had some kind of problem as the 8009 port was listening and the Isapi.log was throwing a “61″ error (http 503).

    Finally, I uncommented the “/servlets-examples/*=wlb” on the uriworker.properties and everything worked.

    The config that I got to work is for a virtual machine with “Intels” but still AMD architecture. Therefore:
    > isapi_redirect for AMD 1.2.30 (I renamed the original file to “isapi_redirect.dll”)
    > Tomcat:5.5.30
    > JRE 1.6.0_21-b07
    > Win2008 + IIS 7.0

  68. 68 On August 17th, 2010, Xabier said:

    Trying further I realised about the main failure: click Native instalation.

    After couple of tests, I found out that if I don’t install the “Native” then it works.

    Best luck!

  69. 69 On August 19th, 2010, Nuno Belo said:

    Thank you for this manual. I had already done this for IIS6, but Microsoft changed the way this was done in IIS7. It was realy helpfull.

    IISAdmin is Bookmarked :-)

    Regards

  70. 70 On September 7th, 2010, Kamran said:

    Hi Guys, I have successfully had tomcat working with IIS7 on a 32 bit machine.. I tried the same thing on AMD64, but I get a 404 error. I checked the jk log file and it says that the url will be redirected to the worker, but still I get a 404. The application is deployed on tomcat and the url is fine aswell, everything else is also configured correctly… I am using the amd64 isapi redirect dll 1.2.30… does anyone know what the problem could be.

  71. 71 On September 21st, 2010, sathish said:

    hi
    i m using iis 7.5 ,apache-tomcat-7.0.2,isapi_redirect and isapi_redirect-1.2.30.dll.
    i configured these on 64 bit windows7 platform at the last i got 500 error related to get filter verion.In IIS modules properties ISAPI.dll is 32 bit module so i thought that it wont work on 64bit platform,By default this module is disabled in application pool.Then i set to true for Enabled 32 bit application then i got HTTP Error 404.3 - Not Found.

    i tried a lot could anyone resolve it

  72. 72 On September 22nd, 2010, James said:

    All -

    After spending hours on this, I found that in the conf/server.xml file for Tomcat, that the AJP/1.3 connector had not been created during setup.

    I had to change this in the Tomcat conf/server.xml file:

  73. 73 On September 27th, 2010, Luc said:

    I tried and get 404 error too.
    I finally found that the Tomact connector is not designed for IIS7 : http://blogs.msdn.com/b/lexli/archive/2009/10/29/astonishing-tomcat-connector-status.aspx

    IIS7 users have to use IIS Application Request Routing (ARR) to replace Tomcat connector. I haven’t tried yet this solution. See here for more details:

    http://blogs.iis.net/mailant/archive/2009/10/22/how-you-can-use-iis7-as-web-front-to-java-app-servers-in-a-3-tier-architecture.aspx

    http://www.iis.net/download/ApplicationRequestRouting

  74. 74 On September 30th, 2010, Luc said:

    Perfect tuto here : http://www.iisadmin.co.uk/?p=326

  75. 75 On October 23rd, 2010, Harsha said:

    Its working for me after a long struggle. Here’s my Configuration

    64 bit Windows 2008 Server:
    Java SE Runtime Env. 6 Update 13 (Platform: Windows) (not windows 64x or Windows intel)
    Apache Tomcat 6.0.18
    JK 1.2.28 Tomcat connector (AMD 64) (dist/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.28/amd64/)

    It started working for me as soon as i replaced the isapi_redirect.dll with the AMD version(above)… (no need of 32 bit compatibility)

    Thank you for this great article. Bravo to author.

  76. 76 On December 2nd, 2010, Michele said:

    Hello I am running GlassFish 2.1.1. For security purposes, it has been suggested that I follow this handout. I have GlassFish 2.1.1 on port 8080 at this time. I am not able to get the installer to run even with Sun’s GlassFish server stopped.

    I am running Windows server 2008 sp2 32-bit.

    Do you have any ideas for me?

    Thanks,
    Michele

  77. 77 On December 3rd, 2010, Paul Lynch said:

    Hi Michele,

    I’m afraid I can’t offer any suggestions. I’d never even heard of GlassFish before I read your comment.

    Regards,

    Paul Lynch

  78. 78 On January 14th, 2011, Myth_043 said:

    I have got http 404.0 error. Resolved.

    Description:
    W2k8 R2 64-bit
    IIS 7.5
    Tomcat 6.0.29
    isapi_redirect.dll 1.2.31 amd-64 from http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win64/jk-1.2.31/amd64/

    All done following the instruction from tomcat website and this site. As a result - error 404.0 instead of redirection. No log file of isapi_redirect.
    Googling for a lot of time with no results.

    Resolution:
    Parameter “Enable 32-bit applications” for DefaultAppPool (this app pool used by default web server) was set to TRUE, probably by sysadmin during OS installation.
    Switching this parameter of default value (false) comletely resolve a problem.
    Step-by-step: start IIS manager, expand your server, click to “Application pools”, click to “DefaultAppPool” in the middle pane (or another app pool your using), on the right pane click to “Advanced settings”, check value of parameter “Enable 32-bit applications”

  79. 79 On February 2nd, 2011, Ethan said:

    Thanks for the tutorial. I also had problems getting the program to recognize the isapi_redirect.properties, and tasklist /m is* didn’t come up with anything it. It turned out, that the only point at which isapi_redirect.dll was loaded was after I tried to go to something like http://localhost/examples. At that point it will then show up in tasklist /m *is and it will try to use the properties file.

    Another thing that I noticed is that the log file will not be written to or created unless you enable the write/create permissions in the folder that you want the log file to be outputted to. The username you need to provide this security to is the name of the app pool (”IIS AppPool\APPPOOLNAME”) If you use the DefaultAppPool, then it would be “IIS AppPool\DefaultAppPool”. I gave DefaultAppPool read access to all parent directories and then write/create file permissions in the specific directory where I wanted the log created. Once I did this, it created the log without issue.

  80. 80 On April 7th, 2011, Steve said:

    The screen shots on page 2 are a bit fuzzy but they contain equal signs, not dashes, so use:

    /admin/*=wlb
    /manager/*=wlb
    /examples/*=wlb

    etc., not “/admin/*-wlb”, otherwise that will result in the 404 error.

  81. 81 On April 8th, 2011, steven said:

    @Myth_043,

    You’re a lifesaver, same thing happened to me. It looks like the default build included the tick to “Enable 32 bit Applications”

    ahh! That was frustrating.

  82. 82 On April 12th, 2011, debian said:

    I has the same error, but following the manual from “How To Install Apache Tomcat with IIS6.doc” everything goes better; I suggest to follow this very GOOD TUTORIAL…

  83. 83 On April 26th, 2011, Darryl said:

    We have been using the JK connector with IIS6 on Win2003. I have been struggling trying to get it to work on IIS7 on Win2008. It just seems that IIS does not see the connector even when all the settings seem correct. I turn on tracing and have the connector at debug level. All I get is 404 and the trace shows nothing but IIS looking in C:\inetpub\wwwroot\… for the path that should be redirected through the connector. Is there anyway to glean more debugging information out of IIS as to why it is not starting the ISAPI filter?

  84. 84 On May 18th, 2011, Guillem said:

    I had the same 404 error. I looked for others tutorials, and I’ve seen there was one step left. This step is allow double scaping

    http://confluence.atlassian.com/display/SPCON/Configuring+Tomcat-Connector+for+IIS+7.0+%28Windows+Server+2008%29#ConfiguringTomcat-ConnectorforIIS7.0%28WindowsServer2008%29-Step6.AllowDoubleEscaping

    I’ve done it and it works fine. Thanks

  85. 85 On June 9th, 2011, Darshan said:

    This Tutorial helped me a lot. I just configured my website using this tutorial. IIS7 is really working with tomcat. Thanks a lot. You saved lot of my time.

  86. 86 On June 11th, 2011, Darshan said:

    In addition I added my servlet pages in the root folder of tomcat with class files and libraries. It works like a charm on localhost default port 80.

  87. 87 On June 15th, 2011, Michael said:

    I am configuring Tomcat to work with my IIS 7 so it will support JIRA. I had the same problem as many people above. But after reading the comments, I found my mistake. I did the “Enable 32-bit applications” in IIS Manager and it’s working again! Unfortunately, now I’m getting a “403: Forbidden” error when I try to load it in the browser. This is usually a permissions error. I double-checked permissions to the directories and also checked my isapi_redirect.dll, uriworkermap.properties, and workers.properties.minimal to make sure all connectors were set to “worker1.” What could be going wrong?

  88. 88 On September 21st, 2011, Louis Savalli said:

    People with the 404 error - I went crazy with it today but resolved it. For me, it was two things:

    1) Where I put the ISAPI filter. Instead of doing it at the “default website”, go up to the server and do it from there (the server name should be one or two lines above the “default website” - that’s where you do it). You’ll see the ISAPI filter at the server level and also at the default website level, too.

    2) I was using port 8080 instead of 8009 in the workers.properties file. You need to use 8009.

    That, I believe, made the difference for me. I did not have to use the registry keys, the isapi_direct.properties worked fine. And the log file showed up, too.

  89. 89 On September 21st, 2011, Louis Savalli said:

    Follow-up: I don’t know what if tomcat on my server is 32 or 64 bit, but it’s a 64-bit OS, and I used the 64-bit isapi_direct.dll, and I did not have to enable 32-bit applications. My tomcat is version 7 and my IIS is version 7.

  90. 90 On September 28th, 2011, Howard said:

    I was getting 404 errors after completing the tutorial. I went to the c:\tomcat\ISAPI directory in Windows Explorer and granted access rights to ISS_IUSRS. After that everything worked fine. I did not have to use the registry keys either.

  91. 91 On October 4th, 2011, Satya said:

    Thanx for this tutorial, after a long struggle… i got it working ..

    I used the following
    . Widnows7 64 bit
    . IIS 7.5
    . Tomcat6.0.33-windows-X64(Binary)
    . Java jdk-6u24-windows-x64.exe
    . JK Connector “tomcat-connectors-1.2.32-windows-x86_64-iis.zip” - extract .dll into ISAPI directory and rename as isapi_redirector.dll
    . set environment variable for JAVA_HOME

    I used registry instead of property file
    ——Reg file——–log level for production may change ——-
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
    “extension_uri”=”/jakarta/isapi_redirector.dll”
    “log_file”=”C:\\Tomcat6.0\\logs\\iis_redirect.log”
    “log_level”=”debug”
    “worker_file”=”C:\\Tomcat6.0\\conf\\workesr.properties”
    “worker_mount_file”=”C:\\Tomcat6.0\\conf\\uriworkermap.properties”
    ———————–

    —-workers file————
    # workers.properties file
    worker.list=ajp13
    worker.ajp13.type=ajp13
    worker.ajp13.host=localhost
    worker.ajp13.port=8009
    worker.ajp13.lbfactor=1
    worker.loadbalancer.type=lb
    worker.loadbalancer.balance_workers=ajp13
    ——————–
    ——uriworkermap——add according to your apps—–
    /examples/*=ajp13
    /examples=ajp13
    /jkmanager=jkstatus
    ———————

    Big note : Make sure all property file extensions, if you create through some editor then it turns editor file not property file. tip: open command prompt and see the file extension, if extension is different then remove extension, eg: workers.properties.txt

    For IIS configuration i used as per tutorial except one minor change, jakarta instead of Jakarta(j as small).

    That’s it…

  92. 92 On October 5th, 2011, Satya said:

    I also tested Tomcat 7 with IIS 7.5
    . Widnows7 64 bit
    . IIS 7.5
    . Tomcat7 32-bit/64-bit Windows Service Installer (pgp, md5)
    . Java jdk-6u24-windows-x64.exe
    . JK Connector “tomcat-connectors-1.2.32-windows-x86_64-iis.zip”

    Its working, no issues

  93. 93 On October 29th, 2011, Adrian said:

    I managed to get this working so thanks for that. The final step i need to do is get iis 7 rewrite module working with it.
    It seems i can get the hello world example working
    but i create a rule like this…. (apache style then imported)
    RewriteRule ^helloworld/?$ /examples/servlets/servlet/HelloWorldExample/ [QSA,NC,PT]
    I get an error which says that
    http://localhost:80/examples/servlets/servlet/HelloWorldExample/
    can not resolve to
    C:\inetpub\wwwroot\examples\servlets\servlet\HelloWorldExample\
    as its being resolved via the static file handler

    Any ideas

  94. 94 On November 5th, 2011, Paul said:

    I struggled with the 404 error for a long time, but I read Louis Savalli’s comment above and the thing that fixed it for me was to define the ISAPI filter at the server level not the website level.

    All working now - thanks very much for the tutorial!

  95. 95 On November 15th, 2011, PepinYaco said:

    First of all, thanks to the OP and owner of this blog for this tut.

    I have a windows home server (2003) I got here looking for “How To Install Apache Tomcat with IIS6″ and got this instead. Would this work for me? or is there a tutorial for IIS6?

    One other thing tho, It would be so great if the original poster will re-write this tut with all the fixes, because im still not 100% clear if this will work for me or not.

  96. 96 On December 4th, 2011, Flowerrrr said:

    For me setting Parameter “Enable 32-bit applications” for DefaultAppPool (details see above) to FALSE did the trick.

    IIS 7.5
    Tomcat 7
    64bit

  97. 97 On January 21st, 2012, Jerry Chen said:

    I got same issue with Pieter Degraeuwe mentioned before:

    1. checking isapi_redirect.log, everything seems fine:
    [Fri Jan 20 15:58:47.474 2012] [4156:2520] [info] init_jk::jk_isapi_plugin.c (2602): Starting Jakarta/ISAPI/isapi_redirector/1.2.32 ()

    [Fri Jan 20 15:58:47.534 2012] [4156:2520] [info] init_jk::jk_isapi_plugin.c (2781): Jakarta/ISAPI/isapi_redirector/1.2.32 () initialized

    2. but when I tried to access http://localhost/examples, I got error:
    HTTP Error 404.0 - Not Found
    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
    Error Code 0×80070002 Logon User Anonymous

    Does anyone figure out the problem?

    Thanks in advance.

  98. 98 On January 25th, 2012, kumar said:

    I am also getting the below error:

    HTTP Error 500.0 - Internal Server Error
    Calling GetFilterVersion on ISAPI filter “C:\Program Files\Apache Software Foundation\Jakarta\bin\isapi_redirect.dll” failed

    I am configuring tomcat-connectors-1.2.32-windows-i386-iis.zip on win 2008 SP2(32 bit OS) on IIS 7.0 . Error on the eventvwr :”Could not load all ISAPI filters for site ‘DEFAULT WEB SITE’. Therefore site startup aborted.”

    Did any one figure out the solution for it?

  99. 99 On February 3rd, 2012, Louis Savalli said:

    So I’m doing this integration again on a different system, and this time my fix above did not work. What did work, eventually, was enabling 32-bit applications in the application pool. So it looks like both fixes may work based on the circumstances.

  100. 100 On February 28th, 2012, Tanu said:

    I am trying to configure this so that http://mywebsite.com (IIS) points to http://localhost:8080/myswebsite (Tomcat).
    Can someone please help me with this urgently.

  101. 101 On April 23rd, 2012, Rahul Agnihotri said:

    Be careful if you have copied configuration settings for uriworkermap.properties/worker.properties from the above posts, there are spelling mistakes as-

    —isapi_redirect.properties—-[MOST IMPORTANT]

    extension_uri=/jarkarta/isapi_redirect.dll ——>extension_uri=/jakarta/isapi_redirect.dll

    —-uriworkermap.properties—

    /manager=*=wlb ——->/manager/*=wlb
    /examples/*wlb ——->/examples/*=wlb
    /servlets-examples/=*wlb ——->/servlets-examples/*=wlb

    —worker.properties—

    worker.list=wlb,jkstatus,oreka ——>worker.list=wlb,jkstatus

  102. 102 On May 15th, 2012, Robert said:

    Your article was a great help to me. Thanks!

  103. 103 On June 14th, 2012, Steve said:

    Awesome writeup - solved an issue which has been bugging me for months…!

  104. 104 On July 1st, 2012, Guy said:

    The file isapi_redirect.properties, has to be reside in the same directory as the isapi_redirect.dll.

  105. 105 On July 16th, 2012, Petro Damic said:

    After trying to use the isapi redirect or for a while on win 2008r2 and could not make it work. I then used the BonCode connector i downloaded from tomcatiis.riaforge.org and things starting working. Much easier and wish someone had told me about it before.

  106. 106 On August 31st, 2012, Ashish said:

    Thanks a lot for nice and clear details. I followed and able to configure in no time. I used registry settings for Isapi redirector and working fine.

  107. 107 On September 14th, 2012, Jerry Graciano said:

    For those of you seeing a 500 error — very important note that I just resolved by starting over for the third/fourth time.

    worker.properties != workers.properties

    There are conflicting references around several articles.
    Ensure that your config file points to the correct worker.properties.

    Thanks for the guide! Good luck!

Leave a Reply

You must be logged in to post a comment.

  • Calendar

  • October 2014
    M T W T F S S
    « Sep    
     12345
    6789101112
    13141516171819
    20212223242526
    2728293031