tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Robert <prob...@os.ca>
Subject Re: JSP not forwarded to Tomcat
Date Tue, 28 Jan 2003 12:37:02 GMT
I think it's a context problem, but I don't know how to fix it.

I have this directory:

/Library/WebServer/Documents/clic-agent.com

Inside this directory, I have a mix of HTML and JSP files, and one WEB-INF
directory (with the default 'lib' and 'classes' directories).  I DON'T have
a ROOT directory, so '/Library/.../clic-agent.com' is the appBase.

Inside server.xml, I have this <Host> directive:

------
<Service name="Tomcat-Apache-modjk">
        <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
            modJk="/usr/libexec/httpd/mod_jk.so"
            jkDebug="info"
            workersConfig="/usr/local/tomcat-4/conf/jk/workers.properties"
            jkLog="/usr/local/tomcat-4/logs/mod_jk.log"
            noRoot="true"
            forwardAll="false"/>

<Host name="test.clic-agent.com" debug="4"
appBase="/Library/WebServer/Documents/clic-agent.com"
       unpackWARs="true" autoDeploy="true">

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
               append="true" />
------

Inside httpd.conf, I have this <VirtualHost>:

------
<VirtualHost *>
    ServerName test.clic-agent.com
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    DocumentRoot "/Library/WebServer/Documents/clic-agent.com"
</VirtualHost>
------

Now, I have a JSP file called 'liste.jsp' inside, so the URL should be:

http://test.clic-agent.com/liste.jsp

I get an good old 'Internal Server Error' when I try this URL.  In
mod_jk.log, I get:

------
[jk_uri_worker_map.c (460)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (477)]: Attempting to map URI '/liste.jsp'
[jk_uri_worker_map.c (558)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
suffix match ajp13 -> *.jsp
[jk_worker.c (132)]: Into wc_get_worker_for_name ajp13
[jk_worker.c (136)]: wc_get_worker_for_name, done did not found a worker
------
 
I try to add:

[uri:/*.jsp]

To my workers.properties file, same error in the log file.

> This is a bug with either Tomcat or the Jk (or Jk2) connector.  I also had
> this problem and I have reported it as a bug to the Tomcat-Developers group.
> 
> In order to work around this fix ... do NOT rely upon the httpd.conf file in
> order to make your vhosts/web-apps work.
> 
> Instead ... make sure you create uri's in the workers2.properties file (if
> you are using Jk2).  Look at how they declare the "/examples" and do this
> for your own vhosts.
> 
> The "/test" is the location of where you have your files.
> 
> If you need any more information, please let me know.    Thanks.
> 
> [uri:/test]
> info=Example webapp in the default context.
> context=/test
> debug=0
> 
> [uri:/test/*.jsp]
> info=Extension mapping
> 
> [uri:/test/*]
> info=Map the whole webapp
> 
> ----- Original Message -----
> From: "Pascal Robert" <probert@os.ca>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Monday, January 27, 2003 10:57 AM
> Subject: JSP not forwarded to Tomcat
> 
> 
>> Hi list,
>> 
>> First, the setup:
>> 
>> - Mac OS X 10.2
>> - Tomcat/4.1.18
>> - Apache/1.3.27
>> - mod_jk-1.3.27.so (build from OS X from Jakarta's site), renamed to
>> mod_jk.so
>> 
>> I tried to get some Virtual Host to work with Tomcat (the webapps for each
>> VirtualHost are outside Tomcat's directory).  Instead of getting the
>> generated JSP, I get the source, just like if the JSP was sent as
> text/plain
>> and was not parsed by Tomcat.  If I look at the 'mod_jk.log' log, I see
>> requests for static HTML files, but I don't see any log information for my
>> JSP files, so it look like mod_jk don't handle them, even if they should.
>> 
>> Apache's config:
>> 
>> ----------------
>> LoadModule jk_module            libexec/httpd/mod_jk.so
>> AddModule mod_jk.c
>> 
>> JkLogFile "/usr/local/tomcat-4/logs/mod_jk.log"
>> JkLogLevel debug
>> JkWorkersFile "/usr/local/tomcat-4/conf/jk/workers.properties"
>> 
>> <VirtualHost *>
>>     ServerName my.host
>>     JkMount /*.jsp ajp13
>>     JkMount /servlet/* ajp13
>>     DocumentRoot "/path/to/the/web/app"
>> </VirtualHost>
>> ----------------
>> 
>> Tomcat's config (server.xml):
>> ----------------
>> <Host name="my.host" debug="1"
>>     appBase="/path/to/the/web"
>>     unpackWARs="true" autoDeploy="true">
>> 
>>     <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
>>         append="true" />
>> 
>>     <Valve className="org.apache.catalina.valves.AccessLogValve"
>>             directory="logs"
>>             prefix="clic_agent_log."
>>             suffix=".txt"
>>             pattern="common"/>
>> 
>>     <Logger className="org.apache.catalina.logger.FileLogger"
>>             directory="logs"
>>             prefix="clic_agent_catalina_log."
>>             suffix=".txt"
>>             timestamp="true"/>
>> 
>>     <Context path="" docBase="app" debug="1"/>
>> </Host>
>> 
>> ----------------
>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
> <mailto:tomcat-user-help@jakarta.apache.org>
>> 
>> 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message