You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Morten Sabroe Mortensen <ye...@hotmail.com> on 2001/02/04 05:21:22 UTC

Q. on Apache+mod_jk+Tomcat problem

I can't get Apache to active Tomcat correctly using mod_jk - Apache appears 
to keep returning the source for JSP-pages instead of the result of their 
execution - please help!

I've seen these symptoms mentioned in various other mails, but none with a 
suitable solution...

Config:
  Linux (Mandrake 7.1)
  Apache 1.3.12
  Tomcat 3.2.1
  mod_jk.so (as obtained from apache.org)

Access to JSP directly through Tomcat's port 8080 is ok.

However, when I request a JSP-page http://www.domainx.com/index.jsp through 
Apache on port 80 I get the page itself - as if it is a static HTML-page!!!

The request *does* appear to trigger a "Found a match ajp13"-listing in the 
"mod_jk.log" file:

[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a 
match ajp13
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a 
match ajp13


However, in this case, the running Tomcat instance -which is run with full 
debug turned on- shows no incoming request (ServletPath, PathInfo, RealPath, 
RequestURI, ... - that list).

How come Apache finds and somehow activates the ajp13-connector, but the 
Tomcat instance never gets to know anything about it???


A summary of my setup is:


Ajp12 + ajp13 connectors set in "server.xml" -

        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
       value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8007"/>
        </Connector>

        <Connector className="org.apache.tomcat.service.PoolTcpConnector">
            <Parameter name="handler"
       value="org.apache.tomcat.service.connector.Ajp13ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
        </Connector>


Included in "httpd.conf" is stuff like -

JkWorkersFile /usr/tomcat/conf/workers.properties
JkLogFile /usr/tomcat/logs/mod_jk.log
JkLogLevel debug

<VirtualHost 192.168.1.2:80>
  ServerName www.domainx.com
  DocumentRoot /usr/tomcat/webapps/domainx.com
  JkMount /*.jsp ajp13
  JkMount /servlet/* ajp13
</VirtualHost>


The "workers.properties" file contains lines like -

workers.tomcat_home=/usr/tomcat
workers.java_home=/usr/java/jdk1.3
ps=/
worker.list=ajp13, ajp12
worker.ajp13.port=8009
worker.ajp13.host=www.domainx.com
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
...


I've tried a zillion things  - but I can't make Apache invoke 
servlets(JSP-pages)...

WHAT am I doing wrong? Any help is greatly appreciated!


Regards,
Morten Sabroe Mortensen


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.