tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei Zheng <zh...@cohesiant.com>
Subject Re: Tomcat IIS problem
Date Thu, 11 Oct 2001 16:28:59 GMT
Hi,

When you integrate tomcat with IIS, you are proxying all your requests
through IIS, then IIS will pass the servlet requsts (or whatever you
specify) to tomcat.  You can choose which requests do you want IIS to serve,
and which requsts you want tomcat to serve through a configuration file
called uriworkermap.properties file.  It's under ur tomcat\conf directory.

So make sure of these 2 things, and your connection will work:
1) Check worker.properties file, make sure you got it set up properly
according to the IIS-howtos. Make sure you have an ajp12 or ajp13 worker
configured so you can refer to them in your uriworkermap.properties file
below.  And also make sure you add whatever classpath support you need in
this file.  (just like you would add to wrapper.properties when you are
installing tomcat as a service)

2) Now check uriworkermap.properties, you can either have tomcat
automatically generate what should go into this file or edit it yourself.
With tomcat 3.2.3, when you start up the tomcat server, you should get an
automatically generated file called 'uriworkermap.properties-auto' file.
Copy the contents of this file into your uriworkermap.properties file.
Notice the following things:

a) it will create a default mapping for the following contexts to the ajp
connector u specify at the top of the file.
/servlet/*=$(default.worker)
/*.jsp=$(default.worker)
Notice it does this for all contexts that are in your \webapps directory.
Very handy.

b) Now if your application does not sit under /servlet/* or is *.jsp, then
you need to add whatever path your servlet is at to the default.worker.  If
there's no common pattern to your servlet paths, do the following:
/direcotory-to-your-app/*=$(default.worker)
This will proxy ALL requests to the tomcat server, even static images and
files.  If this is not what you want, then you should carefully choose the
way your servlet is placed, put them under a seperate directory, so you can
have those proxy to tomcat, and the rest just run on IIS.

Hope this helps,

- Wei

----- Original Message -----
From: "Kwok Chai" <kwokchai@sinoskytech.com>
To: <tomcat-user@jakarta.apache.org>
Cc: <kwokchai@sinoskytech.com>
Sent: Thursday, October 11, 2001 3:38 AM
Subject: Tomcat IIS problem


> Dear Sir/Madam,
>
> I am a porgrammer who is developing Servlet application on Win2K.
> For some reason, I must integrate the Tomcat with IIS.
>
> I am trying to use the ISAPI redirector method but fail, I hope
> you can tell me what problem going on in my system.
>
> I am using Tomcat 3.2.3 and following the guidline in
> tomcat-iis-howto.html under /tomcat/doc directory.
> I am using ajp12 with port 8007 as worker now.
>
> After I finished, I got the IIS filter with the green upward-pointing
> arrow
> and the IIS log told me "GET /jakarta/isapi_redirect.dll 200" already.
> But I still cannot access any servlet program through IIS (I can do if I
>
> talk to Tomcat directly).
> When I try to access servlet through IIS (just a simple servlet under
> /example),
> the Tomcat console window will print out the following sentence:
>
>  PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 Ctx(  ): 404
> R(  + /jakarta/isapi_redirect.dll + null) null
>
> which make me confuse since suppose it will call my serlvet instead of
> the isapi_redirect.dll in Tomcat.
>
> May you tell me what's the problem ?
>
> Here is the portion of isapi log file:
>
> [jk_isapi_plugin.c (408)]: HttpFilterProc started
> [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of
> /examples/servlet/tunnel.Tunnel
> [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker
>
> [jk_uri_worker_map.c (407)]: jk_uri_worker_map_t::map_uri_to_worker,
> Found a match ajp12
> [jk_isapi_plugin.c (439)]: HttpFilterProc
> [/examples/servlet/tunnel.Tunnel] is a servlet url - should redirect to
> ajp12
> [jk_isapi_plugin.c (461)]: HttpFilterProc check if
> [/examples/servlet/tunnel.Tunnel] is points to the web-inf directory
> [jk_isapi_plugin.c (408)]: HttpFilterProc started
> [jk_isapi_plugin.c (429)]: In HttpFilterProc test redirection of
> /jakarta/isapi_redirect.dll
> [jk_uri_worker_map.c (345)]: Into jk_uri_worker_map_t::map_uri_to_worker
>
> [jk_uri_worker_map.c (435)]: jk_uri_worker_map_t::map_uri_to_worker,
> done without a match
> [jk_isapi_plugin.c (452)]: HttpFilterProc [/jakarta/isapi_redirect.dll]
> is not a servlet url
> [jk_isapi_plugin.c (461)]: HttpFilterProc check if
> [/jakarta/isapi_redirect.dll] is points to the web-inf directory
> [jk_isapi_plugin.c (517)]: HttpExtensionProc started
> [jk_worker.c (123)]: Into wc_get_worker_for_name ajp12
> [jk_worker.c (127)]: wc_get_worker_for_name, done  found a worker
> [jk_isapi_plugin.c (539)]: HttpExtensionProc got a worker for name ajp12
>
> [jk_ajp12_worker.c (223)]: Into jk_worker_t::get_endpoint
> [jk_ajp12_worker.c (121)]: Into jk_endpoint_t::service
> [jk_connect.c (108)]: Into jk_open_socket
> [jk_connect.c (115)]: jk_open_socket, try to connect socket = 2504
> [jk_connect.c (124)]: jk_open_socket, after connect ret = 0
> [jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on
> [jk_connect.c (140)]: jk_open_socket, return, sd = 2504
> [jk_ajp12_worker.c (134)]: In jk_endpoint_t::service, sd = 2504
> [jk_ajp12_worker.c (357)]: Into ajpv12_handle_request
> [jk_ajp12_worker.c (361)]: ajpv12_handle_request, sending the ajp12
> start sequence
> [jk_ajp12_worker.c (413)]: ajpv12_handle_request, sending the headers
> [jk_ajp12_worker.c (432)]: ajpv12_handle_request, sending the
> terminating mark
> [jk_ajp12_worker.c (477)]: ajpv12_handle_request done
> [jk_ajp12_worker.c (148)]: In jk_endpoint_t::service, sent request
> [jk_ajp12_worker.c (493)]: Into ajpv12_handle_response
> [jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Status: 404 Not
> Found
> [jk_ajp12_worker.c (535)]: ajpv12_handle_response, read Status=404 Not
> Found
> [jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Content-Type:
> text/html
> [jk_ajp12_worker.c (535)]: ajpv12_handle_response, read
> Content-Type=text/html
> [jk_ajp12_worker.c (547)]: ajpv12_handle_response, allocating header
> arrays
> [jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Content-Length:
> 201
> [jk_ajp12_worker.c (535)]: ajpv12_handle_response, read
> Content-Length=201
> [jk_ajp12_worker.c (507)]: ajpv12_handle_response, read Servlet-Engine:
> Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.3.0_01; Windows
> 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
> [jk_ajp12_worker.c (535)]: ajpv12_handle_response, read
> Servlet-Engine=Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java
> 1.3.0_01; Windows 2000 5.0 x86; java.vendor=Sun Microsystems Inc.)
> [jk_ajp12_worker.c (507)]: ajpv12_handle_response, read
> [jk_ajp12_worker.c (509)]: ajpv12_handle_response, headers are done
> [jk_ajp12_worker.c (568)]: ajpv12_handle_response, starting response
> [jk_isapi_plugin.c (201)]: Into jk_ws_service_t::start_response
> [jk_ajp12_worker.c (579)]: ajpv12_handle_response, reading response body
>
> [jk_isapi_plugin.c (335)]: Into jk_ws_service_t::write
> [jk_ajp12_worker.c (595)]: ajpv12_handle_response, response body is done
>
> [jk_ajp12_worker.c (607)]: ajpv12_handle_response done
> [jk_isapi_plugin.c (551)]: HttpExtensionProc service() returned OK
> [jk_ajp12_worker.c (163)]: Into jk_endpoint_t::done
>
>
>
> Thank you very much for help.
>
> Regards,
> Ken
>
>


Mime
View raw message