• IIS Admin Blog

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

9th September 2008

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

posted in IIS 6.0, Tomcat |

The next step is to add an ISAPI filter on the web site. To do this open the web site Properties and click the ISAPI Filters tab.

Click Add and then enter the details shown below. The name can be anything you like but the path has to point to the isapi_redirect.dll file.

Click OK and you will see the ISAPI filter added to the web site. At this stage the status is ‘Unknown’ because IIS has not received any requests for this particular resource. Once you execute a request you should see Status change to Loaded with a priority of High.

The final step in configuring IIS to add a Web Service Extension for the Tomcat Connector. To do this add a new web service extension and set its status to Allowed as shown here.

Click OK and you should see the new web service extension configured as shown here.

Now we are ready to test. I started by requesting the ‘Hello World’ sample application from Tomcat directly on port 8080 with the result shown here.

The final step is to request the same ‘Hello World’ sample application over port 80 so that the request will be handled by IIS before being forwarded to Tomcat. If everything is configured correctly you should see the sample application load successfully as shown here.

If you now examine the IIS log file (which can be found in C:\WINDOWS\system32\LogFiles unless you moved it) you will see the request for the sample application being handled by IIS over port 80.

Pages: 1 2 3

This entry was posted on Tuesday, September 9th, 2008 at 2:21 pm and is filed under IIS 6.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 68 responses to “How To Configure IIS 6.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 September 12th, 2008, Tom Kaminski said:

    This worked very well. I was unable to get the earlier instructions to work but this was perfect. One issue I have though is a can’t get any new apps to work - tomcat is returning a 404 (IIS shows a 200). I did add my app to uriworkermap.properties as /newapp/*=wlb - else am I missing?

  2. 2 On October 3rd, 2008, Nick Price said:

    Thanks for the instructions! I set this up using Jboss on another application server and it worked perfectly.

    If anyone else gets 404 errors when they connect, you must match the URI worker mapping in the uriworkermap.properties file to the application context that is present on your jboss/tomcat server.

    eg, If you access the application on http://localhost:8080/yourjbossapp/ then you must have the uriworkermap as /yourjbossapp/*=worker
    Otherwise tomcat/jboss just returns 404 errors.

  3. 3 On November 9th, 2008, Sujith said:

    thanks yaar , great help.

  4. 4 On November 17th, 2008, Devin said:

    I’m getting the 404 error too. I am not installing this on the localhost - but rather an IP address of a website on the server. I want anything under that IP to work - my uriworkermap.properties file is set to /*=worker

    If I browse to the IP address, I get the standard Apache page - but when I go to http://myIPaddress/helloWorld.jsp, it gives me the apache 404 error (even though the file is there). I did have some confusion about which port I should be setting it to use - right now it works on localhost:8080 and the IP address i’m talking about. In the properties file I have it set to use :80 (where IIS is serving).

    Thanks

  5. 5 On December 6th, 2008, Guru said:

    I did the exact same things as you mentioned, but when I try to hit the example app through IIS I see a blank screen. The following is the contents of the log file.

    #Fields: date time s-sitename 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
    2008-12-06 19:14:23 W3SVC1 67.78.61.43 GET /azenv.php - 80 - 221.192.199.36 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 64
    2008-12-06 19:14:35 W3SVC1 67.78.61.45 GET /azenv.php - 80 - 221.192.199.36 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 0
    2008-12-06 19:14:38 W3SVC1 67.78.61.42 GET /azenv.php - 80 - 221.192.199.36 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 64
    2008-12-06 19:14:38 W3SVC1 67.78.61.44 GET /azenv.php - 80 - 221.192.199.36 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1) 404 0 64
    2008-12-06 19:24:26 W3SVC1 127.0.0.1 GET /examples/servlets/servlet/HelloWorldExample - 80 - 127.0.0.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.2;+en-US;+rv:1.8.1.17)+Gecko/20080829+Firefox/2.0.0.17 404 0 3

  6. 6 On December 21st, 2008, DJ said:

    You are owesome. I am newbie to IIS.

    I spent six days and I was not able to figure out the problem. By referrring to your post, it has been resolved in 6 seconds. I was missing the last step of configuring web service extensions.

    By the way, can you explain why we need to configure webservice extension?

  7. 7 On January 7th, 2009, How to connect IIS with Tomcat to serve JSP through IIS6 - Serve JSP with IIS....sort of. - CatchBox.org said:

    [...] http://www.iisadmin.co.uk/?p=40 Posted 01-07-2009 18:25 by admin [...]

  8. 8 On February 5th, 2009, IISNewbie said:

    hi

    Its a good reference for IIS Tomcat integration.. but I need a help on how to perform the same when my IIS and JBoss / Tomcat servers are on different machines but same subnet tough…
    In this case if perform the same steps but modify the “host” entry in worker.properties entry will suffice. How can I create virtual directory where tomcat instance is on different machine?

    Please help.

    Thanks in advance

  9. 9 On February 12th, 2009, Omkar said:

    I have IIS setup with iis_redirect.dll on machine1
    and tomcat supporting ajp13 on machine2
    I have made the following change in workers.properties on machine1
    worker.ajp13w.host=machine2

    but still the redirection of requests from machine1 to machine2 is not working. Is there anything else that needs to be done?

  10. 10 On February 19th, 2009, Brenda said:

    Thank you for publishing clear instructions with a date! I also worked on this for days then found your post and fixed it in minutes.

  11. 11 On March 18th, 2009, Andrei said:

    Help! I get an “Incorrect function” message when I finally try to access the tomcat pages on IIS!

    Using IIS6 on WS2k3.

  12. 12 On March 18th, 2009, Paul Lynch said:

    Andrei,

    What do you see in the IIS log files ? What about the Tomcat log files ? I haven’t seen that error message before. Do the sample applications work ?

    Regards,

    Paul Lynch

  13. 13 On April 21st, 2009, Vetrik Kumaran said:

    Hi

    Its a good reference for IIS Tomcat integration.. but I need a help on how to perform the same when my IIS and Tomcat server are on different machines but same subnet tough…
    In this case if perform the same steps but modify the “host” entry in worker.properties entry will suffice. How can I create virtual directory where tomcat instance is on different machine?

    Please help.

    Thanks in advance

  14. 14 On June 3rd, 2009, maiminh said:

    Hello,

    Thank you so much for this How-To. It works fine in my server. Can you show me how to change the webapps folder?

    For example, I have a website with the WebRoot folder is D:\Websites\mysite contains ASP, PHP, Perl,… files in there. My developers can FTP to this folder.

    Now I want to put JSP pages on it. So my developers can FTP to the same folder?

    Is there any way to solve my case?

    Thank you

  15. 15 On June 10th, 2009, Michael Jones said:

    Hi there,

    I already had Tomcat 6 runnning on port 8080 with my webapps. I wanted to root through IIS, so I installed IIS 6 on my Windows 2003 server and then followed your instructions, but I am getting an “Internet Explorer cannot display the webpage” in my browser. Have checked with Netstat and something is listerning on port 80 and 8080. Both have same PID of 4. Can you suggest what the problem could be?

  16. 16 On June 10th, 2009, Paul Lynch said:

    Michael,

    You could try using a utility such as CurrPorts to find the process in question :
    http://www.nirsoft.net/utils/cports.html

    Regards,

  17. 17 On June 28th, 2009, Steven said:

    I have followed all of your steps but I still can’t get this to work. I have installed Tomcat and know it is working properly. IIS works fine until I configure the ISAPI filter. If I try to access any of the Tomcat example apps I get an HTTP 500 internal server error. I found the following error in the ISAPI log file under Tomcat:

    [Sun Jun 28 12:30:47.595 2009] [3172:4064] [info] jk_isapi_plugin.c (2405): Starting Jakarta/ISAPI/isapi_redirector/1.2.28
    [Sun Jun 28 12:30:47.595 2009] [3172:4064] [emerg] jk_isapi_plugin.c (2553): Unable to read worker file C:\Tomcat\conf\workers.properties.

    I have tried changing the permissions on this file and the conf directory but nothing seems to help. Do you have any idea what might be causing this error?

    Any help would be greatly appreciated.

    Thank you.

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

    Steven,

    The error in your ISAPI log file appears to indicate a permissions problem. Have you tried using Process Monitor to see if there are any access denied errors being reported at the NTFS file system level ?

    Regards,

    Paul Lynch

  19. 19 On July 14th, 2009, John Corrigan said:

    Thanks for publishing COMPLETE instructions that actually work! I’ve been screwing with this for a full day. Also, thanks for having a date.

  20. 20 On July 17th, 2009, rm79 said:

    Hi there

    Paul Lynch, I have the same problem

    WXP 32bits, IIS 6, Tomcat 6, Isapi redirector 1.2.28
    Both of the services work fine independently, I can acces to
    localhost - IIS and
    localhost:8080 tomcat

    the problem starts when the isapi redirect is installed and turn it on IIS, and when I try to access the web page IIS shows me this
    Page title: “Error”
    content: “Incorrect Function”

    Any idea?

  21. 21 On August 7th, 2009, IIS 6.0 & Apache Tomcat with the Jk 1.2 Connector « Eugene L. Chua said:

    [...] http://www.iisadmin.co.uk/?p=40 [...]

  22. 22 On September 3rd, 2009, Sam said:

    Hi,

    I’m getting the “Incorrect Function” error as well. Using isapi_redirect-1.2.28.dll, IIS 6, Tomcat 6 and win2k. Everything works as expected if I run in IIS 5.0 isolation mode.

    This seems to be related to the problem mentioned on msdn about the change in permissions in IIS 6 (”Applications Are Denied Access to Resources” on http://msdn.microsoft.com/en-us/library/ms524996.aspx#modes) but I don’t know what (if any) permissions need to be set to get this connector working.

    I’ve also come across various posts saying spaces in the install directories can cause problems. Is this true? I don’t really want to reinstall Tomcat… :(

    There seems to be a lot of people with this problem but no solution! Any help would be greatly appreciated.

  23. 23 On September 4th, 2009, Sam said:

    Still no answer to the “incorrect function” problem…

    I tried reinstalling tomcat under c:/tomcat and added the user permissions to the tomcat folder as mentioned here: http://eugenelchua.wordpress.com/2009/08/07/iis-apache-tomcat/ but still no success.

    The main reason why we wanted to disable IIS 5.0 isolation mode was to be able to stop the application pool so that the server will return 503 responses during maintenance. For now we are just going to reduce the number of connections to 0 (properties -> performance) as a workaround to force a 503 for all requests.

    Hopefully one day someone will post the solution to running the jk connector in worker process isolation mode.

  24. 24 On September 10th, 2009, Tony said:

    I’ve gone through but when I test it receive this error

    Bad Gateway!

    There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

    My ISAPI log file gives this error
    [Thu Sep 10 16:22:43.109 2009] [4912:6136] [error] jk_ajp_common.c (1172): wrong message format 0×4854 from 127.0.0.1:8080

    Any idea what’s wrong? Thanks

  25. 25 On November 6th, 2009, Phil T said:

    For Windows 2003 64-bit you need an extra step.
    I had to run this at a command prompt to enable IIS to use 32-bit ISAPI dll’s.

    cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1

    From this site below:
    http://extended64.com/blogs/rhoffman/archive/2005/05/10/482.aspx

  26. 26 On November 9th, 2009, kishore said:

    Hi,

    Thanks for your instructions. Its working fine. if i give “http://localhost/shoppingcart/” i am getting shoppingcart application home page. I want to make shoppingcart as a default application. i.e. if type http://localhost/ then i need shopping cart home page. could you please suggest me what to do? Thanks

  27. 27 On November 21st, 2009, Shuang Gao said:

    the “wlb” configuration is not necessary if you have just one worker (i.e. ajp13w)
    Replace all “wlb” with ajp13w in uriworkmap.properties and worker.properties
    and remove the load balancer section in worker.properties will work just fine

  28. 28 On December 8th, 2009, Chin said:

    Me: w2003
    compaq evo w6000
    apache tomcat 5.5.28
    isapi_redirect.dll 1.2.28
    IIS 6
    ——————————————————–
    Hello everyone,

    I finally get to the “incorrect function” point. It seems that this Problem has different causes.
    If u read my logs u will c IIS says http 500 error (Internal server error) and i cant find any solution or hint to my last 2 ISAPI log Entries.

    my log files:

    isapi log:
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_util.c (458): Pre-processed log time stamp format is ‘[%a %b %d %H:%M:%S.000 %Y] ‘
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [info] jk_isapi_plugin.c (2405): Starting Jakarta/ISAPI/isapi_redirector/1.2.28
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2423): Detected IIS version 6.0
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2425): Using ini file C:\Tomcat\ISAPI\isapi_redirect.properties.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2431): Using log file C:\Tomcat\logs\isapi_redirect.log.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2432): Using log level 1.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2433): Using extension uri /jakarta/isapi_redirect.dll.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2434): Using worker file C:\Tomcat\conf\workers.properties.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2435): Using worker mount file C:\Tomcat\conf\uriworkermap.properties.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2437): Using rewrite rule file .
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2439): Using uri select 3.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2440): Using no chunked encoding.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2442): Using notification event SF_NOTIFY_AUTH_COMPLETE (0×04000000)
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2452): Using uri header TOMCATURI6A6B0000:.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2453): Using query header TOMCATQUERY6A6B0000:.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2454): Using worker header TOMCATWORKER6A6B0000:.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2455): Using worker index TOMCATWORKERIDX6A6B0000:.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2456): Using translate header TOMCATTRANSLATE6A6B0000:.
    [Tue Dec 08 19:40:00.484 2009] [2400:2684] [debug] jk_isapi_plugin.c (2457): Using a default of 250 connections per pool.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/admin/*’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/manager/*’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/jsp-examples/*’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/servlets-examples/*’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/examples/*’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘!/servlets-examples/*.jpeg’ with value ‘wlb’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘/jkmanager’ with value ‘jkstatus’ to map.
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (1102): Loading urimaps from C:\Tomcat\conf\uriworkermap.properties with reload check interval 60 seconds
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/admin/*=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/manager/*=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/jsp-examples/*=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/servlets-examples/*=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/examples/*=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (720): wildchar rule ‘/servlets-examples/*.jpeg=wlb’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (729): exact rule ‘/jkmanager=jkstatus’ source ‘uriworkermap’ was added
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (171): uri map dump after file load: index=0 file=’C:\Tomcat\conf\uriworkermap.properties’ reject_unsafe=0 reload=60 modified=1188757932 checked=1260297600
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (176): generation 1: size=7 nosize=1 capacity=8
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/servlets-examples/*.jpeg worker=wlb context=/servlets-examples/*.jpeg source=uriworkermap type=Unmount Wildchar len=25
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #1: uri=/servlets-examples/* worker=wlb context=/servlets-examples/* source=uriworkermap type=Wildchar len=20
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #2: uri=/jsp-examples/* worker=wlb context=/jsp-examples/* source=uriworkermap type=Wildchar len=15
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #3: uri=/examples/* worker=wlb context=/examples/* source=uriworkermap type=Wildchar len=11
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #4: uri=/manager/* worker=wlb context=/manager/* source=uriworkermap type=Wildchar len=10
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #5: uri=/admin/* worker=wlb context=/admin/* source=uriworkermap type=Wildchar len=8
    [Tue Dec 08 19:40:00.515 2009] [2400:2684] [debug] jk_uri_worker_map.c (186): NEXT (1) map #6: uri=/jkmanager worker=jkstatus context=/jkmanager source=uriworkermap type=Exact len=10
    [Tue Dec 08 19:40:00.531 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘worker.list’ with value ‘wlb,jkstatus’ to map.
    [Tue Dec 08 19:40:00.531 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘worker.ajp13w.type’ with value ‘ajp13′ to map.
    [Tue Dec 08 19:40:00.531 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘worker.ajp13w.host’ with value ‘localhost’ to map.
    [Tue Dec 08 19:40:00.546 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘worker.ajp13w.port’ with value ‘8009′ to map.
    [Tue Dec 08 19:40:00.546 2009] [2400:2684] [debug] jk_map.c (491): Adding property ‘worker.wlb.type’ with value ‘lb’ to map.
    [Tue Dec 08 19:40:00.546 2009] [2400:2684] [error] jk_map.c (404): The attribute ‘worker.wlb.balance_worker’ is not supported - please check the documentation for the supported attributes.
    [Tue Dec 08 19:40:00.546 2009] [2400:2684] [emerg] jk_isapi_plugin.c (2553): Unable to read worker file C:\Tomcat\conf\workers.properties.

    —————————————————————–

    IIS website log:
    #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2009-12-08 18:40:00 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 380 421
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:03 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:04 W3SVC1763425915 ATLANTIS 192.168.2.101 GET / - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 406 0
    2009-12-08 18:40:10 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /test.php - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 388 0
    2009-12-08 18:40:10 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /test.php - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 388 0
    2009-12-08 18:41:02 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /servlets-examples/ - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 398 0
    2009-12-08 18:41:02 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /servlets-examples/ - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 - - atlantis 500 0 1 271 398 0
    2009-12-08 18:41:15 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /jsp-examples/ - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 JSESSIONID=8521F125099C2459293A111F5ACD429E - atlantis 500 0 1 271 446 0
    2009-12-08 18:41:15 W3SVC1763425915 ATLANTIS 192.168.2.101 GET /jsp-examples/ - 80 - 192.168.2.100 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+de;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5 JSESSIONID=8521F125099C2459293A111F5ACD429E - atlantis 500 0 1 271 446 0

    i hope some one can

  29. 29 On December 12th, 2009, al said:

    This is a great ‘how-to’ - clear and concise…if only I could get it to work.
    Am running IIS6.0 on win2k3SP2. Tomcat installed and running on localhost:8080 (I can open the app from a browser).
    dll is loaded properly and config is correct - when I try to access the only URI I have mapped I get the following error:

    [Sat Dec 12 17:56:03.716 2009] [4944:6872] [error] jk_ajp_common.c (1172): wrong message format 0×4854 from 127.0.0.1:8080

    - so it *has* matched URI and sent it through the ajp13 to the host….but doesnt like the response?
    Any ideas? As I say I know the tomcat host is up an operational on that port
    I saw someone else posted the same problem but didnt see a solution.

  30. 30 On December 21st, 2009, Granville said:

    I to have been having problems. First I was using tomcat 5.5 and I thought it might have been the problem, but I kept at it and I finally figured it out how to get away from the “incorrect function” but I ended up on the “Page not found” problem. the URL’s are different for 5.5 then 6 so you’ll need to adjust appropriately.

    To get rid of the “incorrect function” double check that the workers.properties file and uriworkermap.properties file have everything spelled correctly. I have a typo in the word balance.

    when I try to view an example on port 80 the file c:\tomcat\logs\isapi_redirect.log says that Jakarta/ISAPi/isap_redirecto/1.2.28 is starting, and that it initialized, so I know that IIS is trying to redirect to tomcat, but something is still not configured or working right.

  31. 31 On December 28th, 2009, Chin said:

    me again.

    i solved few probs.

    If you get “incorrect function” in your browser and your isapi filter for your website is green, then that means you got your IIS right there where it should be and the problem(s) lies behind that, it could be something is spelled wrong in 1 of your properties files (it was in my case).

    ISAPI filter is red/not loaded, though you downloaded and located it correctly … it wasnt metioned in this tutorial or else where that you should turn off your IIS (commandline: iisreset /stop) and your apache Tomcat server. (it cost me a lot of time)

    ….

    I switched from mini worker.properties to the full worker.properties file (source: apache tomcat site; it helped me a lot). now non-java related things are super ok ^0^ only prob is blank pages from java related pages, iis-log says http 500 and isapi_redirect.log mentioned [debug] did not find a worker wlb & [error] could not get a worker for name wlb.

  32. 32 On January 11th, 2010, Kilian said:

    Hi,

    I am also getting the “incorrect function” error. I’m using Tomcat6, IIS6 and Win 2003 64Bit.

    The ISAPI Filter shows a green arrow.

    I checked my properties-files and also tried the worker.properties file from the apache tomcat web site.
    Actually I use this workers.properties file:

    # Define 1 real worker using ajp13
    worker.list=worker1

    # Set properties for worker1 (ajp13)
    worker.worker1.type=ajp13
    worker.worker1.host=localhost
    worker.worker1.port=8009

    Any ideas?

  33. 33 On January 12th, 2010, Tina said:

    Hi!

    Thanks for a great instruction!

    I´ve got it to work almost as I want. I want the IIS to handle .html and .jpg-files and for these files not send the request to Tomcat. But when I in the uriworkermap.properties write:
    !/appname/*.html=wlb
    Then no html-page are found…
    I thought that when I wrote this in the uriworkermap.properties it ment that the IIS would handle the .html-pages it self. Did I misunderstand?
    (I have a wwwroot specified for the application under IIS and the .html-files are found there.)

    Any ideas?

  34. 34 On January 14th, 2010, ramnam said:

    If you are getting “incorrect function” using this setup in Win2K Server, delete the configuration from IIS completely, redo this tutorial once again following exactly what it says and use JK Connector 1.2.28 instead of the one listed here. You should then be fine.

  35. 35 On January 28th, 2010, SteveR said:

    It’s almost working, http://localhost:8080 items work fine, but when I try to just use http://localhost via port 80 it prompts you to download the file, be it the html or the jsp.

    What are your thoughts? Thanks in advance!
    Steve

  36. 36 On January 29th, 2010, Kilian said:

    Hi again,
    everything worked fine using the JK Connector 1.2.28 for a little while.
    But now, only when I call the HelloWorldExample directly from the webserver (localhost on port 80) the page comes up. If I try to call the page from another location, I am getting a 404 error from IIS. From outside I still have to use port 8080 to get a connection to tomcat. There are no entries in the IIS log file after getting the 404 error. The configuration is exactly the same as in the tutorial.
    Any ideas what’s wrong here?

    I have Plesk 7.0 installed on my server. Maybe that could be a problem?

  37. 37 On February 11th, 2010, calvin said:

    I got a problem with the final step because i use IIS 5
    how to add a Web Service Extension for the Tomcat Connector on IIS 5?
    thanks before

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

    @calvin,

    There are no Web Service Extensions in IIS 5.0 - this is a feature that only exists in IIS 6.0 and higher. I’ll take a look at putting together an article which covers IIS 5.0 in the future.

    Regards,

    Paul Lynch

  39. 39 On February 13th, 2010, IIS, Tomcat and SSL « Exocortex said:

    [...] filter comes in the form of a DLL from Apache. Instructions on how to do this can be obtained from this site. The instructions are pretty good. However, I still have a few comments to [...]

  40. 40 On March 9th, 2010, Dennis said:

    Windows 2003 Std 64-bit, isapi_redirect.dll (v1.2.30/AMD64), IIS6, CFMX8, J2SDK1.4.2_19. Everytime I load the filter for the website I get:
    Event Type: Error
    Event Source: W3SVC-WP
    Event Category: None
    Event ID: 2214
    Description:
    The HTTP Filter DLL E:\Tomcat4\bin\isapi_redirect.dll failed to load. The data is the error.
    Data:
    0000: 02 00 00 00 ….
    —————-
    C:\>net helpmsg 2
    The system cannot find the file specified.
    =========================
    I have followed the documentation from Tomcat which is practically what you have on your website. What am I missing or where to go from here?!?

  41. 41 On March 22nd, 2010, James said:

    I am having the exact same problem as Dennis

    Windows 2003 Std 64-bit, isapi_redirect.dll (v1.2.30/AMD64), IIS6, JRE6
    Everytime I load the filter for the website I get:
    Event Type: Error
    Event Source: W3SVC-WP
    Event Category: None
    Event ID: 2214
    Description:
    The HTTP Filter DLL E:\Tomcat4\bin\isapi_redirect.dll failed to load. The data is the error.
    Data:
    0000: 02 00 00 00 ….

    Driving me NUTS! Any help here would save my sanity!

  42. 42 On March 23rd, 2010, Nove said:

    Hi Paul,

    I’m having the problem that my isapi_redirect.dll is not loaded in ISAPI Failter.
    The status shows “Not Loaded” in detail. My Java version is “jre-1_5_0_15-windows-i586-p.exe”. Tomcat is 5.5.26 and IIS is 6. When I browse “http://localhost:8080/servlets-examples/servlet/HelloWorldExample”, it’s fine. But when I browse without port, I got the error “Internet Explorer cannot display the webpage”. Is it because of my filter is not loaded? Is it because of my java version is not 6?? HELP!!!HELP!!!HELP!!

  43. 43 On March 25th, 2010, James said:

    Check all the paths in you .properties files.

    I was missing the isapi_redirect.properties files. I had copied it all from another machine and the paths were all wrong.

    Once I fixed that it started working.

    Hope that helps.

  44. 44 On April 23rd, 2010, Rafe said:

    Excellent article! I was able to use it to migrate the majority of my companies’ website from one server to another even though I’d never had prior experience with Tomcat. That being said, I’ve got two problems still: I can access the new site via ip address only if I add :8080 to the URL, and two, when I try to go to what used to be the secure portion of the site (login) I receive a ‘Problem loading page - can’t connect’ on port 8443.

    From all the reading I’ve done, port 8443 is for SSL of some kind, which is alluded to in the server.xml file thusly:

    I have an SSL certificate assigned to the site via IIS and was under the impression that by default Tomcat allowed IIS to handle secure connections but apparently something is munged because it’s not working. There is another section in the server.xml that reads like this:

    Which I’m not sure what it is for although port 443 is the SSL port that IIS uses so I’m confused as to what this is supposed to be doing.

    Anyone have any pointers as to where to look for a solution?

  45. 45 On June 4th, 2010, QSTomcat said:

    We recently got a new server, and would like to run an application with Tomcat on it. So we installed
    - IIS 7.0
    - Java JRE 6u20 (C:\Java)
    - Tomcat 6.0.26 (C:\Tomcat)

    I followed the steps in this tutorial which seemed quite explicit and easy to follow. It’s just that now … when we try to access servlets over the web, we can’t loose the 404 error message.

    404 - File or directory not found.
    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    I’ve followed the steps in several threads

    http://www.coderanch.com/t/362081/Servlets/java/To…quested-resource-not-available
    http://www.coderanch.com/t/359955/Servlets/java/HT…Status-servlet-error-requested

    and also in the FAQ
    http://faq.javaranch.com/view?InvokerServlet

    but can’t seem to be able to get anywhere.

    We’ve been looking at the Hello World example.
    If we comment out the servlet-mapping (just as a test) - the localhost:8080 no longer works.

    invoker
    /servlet/*

    So i put the comments back in - works again.

    We shouldn’t have to do that anyway since the servlet mappings and and servlet declarations are already in place in the web.xml file under:
    C:\Tomcat\webapps\examples\WEB-INF

    copy from this file:

    HelloWorldExample
    HelloWorldExample

    Any thoughts would be appreciated.
    Thanks much

  46. 46 On June 4th, 2010, QSTomcat said:

    All of the steps have been completed:
    - jakarta virtual directory
    - handler mappings with enabled ISAPI-dll
    - CGI restrictions configured with Tomcat - ISAPI_redirect.dll

    … not sure what we’re missing.
    Every time we try to access the site through IIS it fails when it gets to the JSP pages (HTML works fine)

  47. 47 On June 10th, 2010, Greg Dawson said:

    I had to add a MIME type for JSPs, then the 404s went away. In the IIS Control Panel:

    1. Right-click the server name –> Properties
    2. Click MIME Types button
    3. Add a new MIME type for “.jsp”, “text/html”
    4. Click OK twice
    5. Restart IIS

  48. 48 On June 25th, 2010, Robert Heritage said:

    I have been over and over this over and over again for the last two days. I checked and rechecked everything. I checked spelling, case, re-installed tomcat in file paths without spaces, I even checked I didn’t have my pants on inside out. I gave everyone full control of everything and still it didn’t work. I sacrificed time with my family and a portion of my soul to trying to get IIS to work with Tomcat.

    In the end, I replaced the 1.2.30 isapi_redirect.dll with the 1.2.28 version and hey presto! Suddenly it works.

    Now I can die happy!

  49. 49 On June 28th, 2010, Robert Heritage said:

    File permissions of the Apache folders also have a part in this - I will post the minimum requirements once I figure it out.

  50. 50 On June 28th, 2010, Robert Heritage said:

    ok, I reckon these are the minimum file permissions you need to set to get this working (your install path might be different);

    Apache\Tomcat\Conf, NETWORK SERVICE, Read
    Apache\Tomcat\ISAPI, NETWORK SERVICE, Read
    Apache\Tomcat\ISAPI, IUSR_machineName, Read
    Apache\Tomcat\lib, NETWORK SERVICE, Read
    Apache\Tomcat\logs, NETWORK SERVICE, Read & write

    also remember that;

    http://SERVERNAME/examples/
    is correct

    but

    http://SERVERNAME/examples
    will give a 404

    which can cause confusion.

    You will get event ID’s 2214 and 2268 in the application log if the file permissions are not set up right and the ISAPI filter will fail to load (red downward arrow) in the IIS Manager

  51. 51 On June 28th, 2010, Robert Heritage said:

    HELP! Can you please anonymise the server names in my previous comment

  52. 52 On June 28th, 2010, Robert Heritage said:

    Also, I’d like to retract my earlier statement about the isapi_redirect.dll version. Once the file permissions above are set up correctly it WILL work with the 1.2.30 version of the isapi_redirect.dll

    So post 48 is a red herring (I must have done the permissions at the same time)

    Perhaps you could include the info about the file permissions in the main article?

  53. 53 On July 29th, 2010, Harro said:

    Well, I got it to work: windows 2003 server, 64bits, IIS6. Cost me quite a few hours, but it’s running now on my dev. platform, localhost port 85.

    I used stuff from the previous post, combined with the configuration-manual here. I didn’t need to make and edit a key, btw. I’m testing now how changing parts of the configuration can soup things up again (walking back the same road). Maybe I can add some tips here.

  54. 54 On August 7th, 2010, Jeremy said:

    I was getting a 404 IIS error even after setting up as directed. After scouring and re-setting everything multiple times, I found that there must’ve been some sort of special character in my isapi_redirect.properties file that was causing it not to be processed correctly. When I created it initially, i just copied the text from the apache-tomcat page and modified the paths. To fix it, at a command prompt, I typed ‘type isapi_redirect.properties>isapi_redirect2.properties’, then deleted the original and renamed the new file, and everything started working. Hope this helps someone else.

  55. 55 On August 23rd, 2010, YK said:

    I was also trying to configure Tomcat with IIS6 on Win2K and was facing “Incorrect Function” problem. It turned out that I had mistakenly created “worker.properties” file instead of “workers.properties”. Once I corrected the file name, it worked fine.

  56. 56 On August 31st, 2010, PremG said:

    I have been trying this since last 2days without any luck. I am trying to configure on windows 2003 server, 64bits, IIS6. Note that I not using Tomcat on same server rather want to redirect on another linux system using the workers.properties.

    I have got this working on 32bit w2k3 server with IIS6, however it just does not work on x64bit server. I tried using both jk-1.2.28 and jk-1.2.30 (from bothamd64 and ia64) versions of isapi_redirect.dll. I double checked everything again and again, and also set the permissions as suggested by Robert Heritage.

    ISAPI filter will fail to load (red downward arrow) in the IIS Manager. Also if i create the jakarta virtual directory under same Default Web Site where Citrix is also installed, even citrix site stops working.

    I am sure i am missing something very basic, however just cant get what it is ;)

    Harro,

    Could you please provide tips on what you did to make it working?

  57. 57 On August 31st, 2010, PremG said:

    Ok so i got my issue fixed :) as i mentioned it was simple basic rule (pay attention to detail). Well i had my isapi_redirect.properties file on wrong path (it has to be where isapi_redirect.dll file is located). And yes, i am using 32-bit ISAPI DLL and enabled Enable32bitAppOnWin64 via cscript command on adsutil.vbs.

  58. 58 On April 4th, 2011, Brian Falstow said:

    There is a new connector available that connects tomcat to IIS. Works without any of the ISAPI overhead and can handle 32/64 bit.
    Maybe worth checking out:
    http://tomcatiis.riaforge.org/

  59. 59 On May 17th, 2011, Andrew Bacon said:

    It doesn’t look like this thread is being monitored, but still… I’m flummoxed, so I’ll give it a try anyway.

    I’ve been working on configuring IIS for use with Tomcat to support .jsp for a day or so, and I’ve got it working on port 8080, but not on port 80… example:

    http://jsp.theitconsultancy.com:8080/examples/jsp/... click any “Execute” link and the jsp is processed and works…

    http://jsp.theitconsultancy.com/examples/jsp/... click any “Execute” link and the browser attempts to download the .jsp file.

    Do you have any ideas what might be happening? It appears as though IIS isn’t recognizing that .jsp files need to be processed through Tomcat unless port 8080 is called out specifically. TIA!

  60. 60 On May 18th, 2011, Paul Lynch said:

    @Andrew Bacon,

    It sounds like you don’t have Tomcat configured properly for integration with IIS. If you follow the steps in the article to the letter it will work. Check this forum post for more details : http://forums.iis.net/p/1158042/1905482.aspx#1905482

    Regards,

    Paul Lynch

  61. 61 On July 12th, 2011, Douglas said:

    Hope someone can help here, I’m at a complete loss! I’ve followed the documentation at the Tomcat website to the letter and also this guide. Server environment is Windows Server 2003, IIS 6, Tomcat 7.0.18 and isapi_redirect.dll. I get a persistant blank page that won’t change no matter what I do, yet it works perfectly in my IIS 7.5 on my laptop.

    What I’ve done in IIS:

    Added a virtual directory with the name jakarta pointing to E:\Tomcat\isapi
    Went into the website properties, added an ISAPI filter pointing to E:\Tomcat\isapi\isapi_redirect2.dll - green light
    Added .jsp to Mappings in configuration, pointing to E:\Tomcat\isapi\isapi_redirect2.dll
    Website has Scripts and Executables permissions
    Added a Web Service Extension with the name Tomcat pointing to E:\Tomcat\isapi\isapi_redirect2.dll with permission set to Allowed

    Everything looks correct, even in my Tomcat setup with uriworkermap.properties and workers.properties. It must be correct since it works in my IIS 7.5. I’ve modified the registry as in the documentation. It’s this blank page that’s the main frustration. Other mappings from Tomcat like /examples/ seem to work fine. Hope someone will be able to advise.

  62. 62 On September 30th, 2011, Cardiff Builder said:

    Adding a MIME type for JSP files solved the 404 problem for me. Thanks very much for this interesting and helpful post.

  63. 63 On December 23rd, 2011, Tony said:

    Thank you, the instructions work except for the properties file - I was getting the “incorrect function” that some others were experiencing until I moved the parameters into the registry instead of using the isapi_redirect.properties file. After that, the servlets work fine. Might have something to do with the fact that this example uses isapi_redirect-1.2.26.dll, while I used v1.2.32 (on Tomcat 6, IIS 6, Windows 2003 Server).

  64. 64 On January 5th, 2012, Anoop said:

    Hi, i found this a good tutorial….
    Thanks to IISADMIN team for guiding behalf of me as well as those who couldnt reply after getting guidance….

    I am facing a problem.

    I ve Tomcat5.5 & IIS 5.1.
    I was able to configure isapi_redirector.

    The website is working on tomcat. say http://localhost:8080/mywebapp/
    but when i enter http://localhost/mywebapp/ i ll get an error “The request is not supported”.

    can any one help me to troubleshoot this problem????

    Thanks in advance….

    Regards,
    Anoop Kumar P,
    anoop.kumar2488@gmail.com

  65. 65 On March 27th, 2012, venkat said:

    Hi,

    I have followed all the steps from this site and I have tried all the comments posted on this,but no luck.
    I am trying this since 3 days again and again same error 500, seems that the dll file is unable to redirect the request to my tomcat server..

    When I add the filter the site stops executing the static file(HTML) and in some post’s it is suggested to add MIME type for jsp , when I add that the jsp contents are displayed as just text file’s.
    It means the jsp’s are not executed by tomcat,just IIS is executing the JSP as a text files.

    Any help on this is appriciated.
    Please help me out.

  66. 66 On April 10th, 2012, Neil Lasher said:

    I am three days into this project.

    I had a fully working system on an old win2003 server running Tomcat 5.5 and early JRE

    Now I am on a 2003 64 bit running Tomcat6 (downgraded from 7 and JRE7

    Localhost:8080 Works fine hostname:8080 works fine hostname:8080/examples works fine but on port 80 I cant get a resolve just error 404’s

    I tried .properties file with the all, I tried moving it to the registry, I have died every way I can but I still have a red arrow in the IIS ISapi Redirect.

    Can anyone help me out here?

    Should I consider installing Apache httpd instead of IIS? Anyone had lucy there.

    Or do I try to run the old server in a hyperV there must be a way to get this to work…

  67. 67 On August 29th, 2012, Sasa said:

    Thank you very much!

  68. 68 On October 25th, 2012, klajdi said:

    Can you change the default 503 error page that Apache returns by configuring smth in the worker? then how do you restart the process in windows ???

Leave a Reply

You must be logged in to post a comment.

  • Calendar

  • November 2014
    M T W T F S S
    « Sep    
     12
    3456789
    10111213141516
    17181920212223
    24252627282930