tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: Tricky configuration problem of Tomcat 3.3 - Cocoon 1.8.1 - A pache 1.3.19
Date Mon, 03 Dec 2001 13:57:31 GMT
Hi Andi,

You don't mention below what directives you added to inform
Apache how to find the "/siteos" resources.  You can try adding:

    forwardAll="false"

to the <ApacheConfig ...> entry to have a conf/auto/mod_jk.conf
file written that tries to allow Apache to serve static resources.
You can use this file as a starting point if it doesn't quite
generate the file you need.

If you want the "root" context included, set:

    noRoot="false"

as well.  Since Apache has its own idea about where the "root"
resources are, i.e. DocumentRoot, and Tomcat thinks they are
in "webapps/ROOT", you will need to update your configuration
to choose one or the other.  You can either point Apache's
DocumentRoot to "webapps/ROOT" or convert Apache's "htdocs"
into a web application and point Tomcat's "root" context
to Apache's converted "htdocs".

Hope this helps.

Cheers,
Larry


> -----Original Message-----
> From: Andreas Germeroth [mailto:ag@siteos.de]
> Sent: Saturday, December 01, 2001 7:56 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Tricky configuration problem of Tomcat 3.3 - Cocoon 1.8.1 -
> Apache 1.3.19
> 
> 
> Hello everybody,
> 
> 
> 
> My System environment: 
> 
> 
> 
> Tomcat 3.3  / mod_jk
> 
> Cocoon 1.8.1  
> 
> Apache 1.3.19 
> 
> 
> 
> on Linux 2.4.4 . (mod_jk.conf and apps-context.xml are appended)
> 
> 
> 
> I have to migrate an existing Cocoon - WebApplication from JServ to
> 
> Tomcat. 
> 
> 
> 
> First I had set up a context path "/siteos" which directs all requests
> 
> to Tomcat, just for
> 
> testing if Cocoon works and all classpathes are correct. This worked
> 
> fine ( *.xml files are processed by Cocoon), but this is not 
> what I want
> 
> in a production environment, because all requests behind "/siteos" are
> 
> directed to Tomcat, static html- files, images and so on... Tomcat
> 
> should get only the "/*.xml" and "/servlet" requests, alle the other
> 
> request should be handled by Apache. 
> 
> The first step I tried was to change mod_jk.conf :
> 
> 
> 
> JkMount /siteos/servlet/* ajp13
> 
> JkMount /siteos/*.xml ajp13
> 
> 
> 
> The procseesing of xml and servlets worked correctly, but the other
> 
> ressources of the application (images, javascripts,..) could not be
> 
> found by apache. To solve this Problem
> 
> one has to adjust the directory structure of the application and thats
> 
> not what I want :-)
> 
> 
> 
> Without changing the directory structure *.xml Files should 
> be processed
> 
> by cocoon without a context path.
> 
> Then I set up the default context path "" with points to the document
> 
> root of the Apache Web server (see apps-context.xm) and configured
> 
> mod_jk to direct "*.xml" files and "/servlet" to Tomcat (see
> 
> mod_jk.conf). Servlets are still working. Unfortunately "*.xml" files
> are not
> 
> processed by Coocon and trigger a simple file download in the browser.
> 
> Just for testing I tried a *.jsp and put it in the same 
> directory as the
> xmls, the jsp was compiled and executed by tomcat, so that works also
> 
> 
> 
> All log levels are set to DEBUG to find out what happens. In 
> the jk.log
> 
> the *.xml files are recognized correct.
> 
> jk.log
> 
> -------
> 
> [Sat Dec 01 13:09:26 2001]  [jk_uri_worker_map.c (351)]: Into
> 
> jk_uri_worker_map_t::map_uri_to_worker
> 
> [Sat Dec 01 13:09:26 2001]  [jk_uri_worker_map.c (368)]: Attempting to
> 
> map URI '/standard.xml'
> 
> [Sat Dec 01 13:09:26 2001]  [jk_uri_worker_map.c (416)]:
> 
> jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match ajp13 ->
> 
> *.xml
> 
> ------
> 
> There is no print out in the servlet.log and in the tc.log. In the
> Apache access_log there is a 200 - OK entry, due to the "normal" file
> download.
> 
> In my opinion the problem is somewhere in Tomcat, as the requests are
> directed to Tomcat by mod_jk.
> 
> 
> Thanks for your help,
> 
> best regards
> 
> Andi
> 
> 
> 
> mod_jk.conf 
> 
> -----------------------------------------
> 
> LoadModule    jk_module  /sostest/tomcat/modules/mod_jk.so
> 
> AddModule     mod_jk.c
> 
> 
> 
> <IfModule mod_jk.c>
> 
> JkWorkersFile /sostest/tomcat/conf/jk/workers.properties
> 
> JkLogFile  /sostest/tomcat/logs/jk.log
> 
> JkLogLevel debug
> 
> 
> 
> AddType text/xml .xml
> 
> 
> 
> JkMount /siteos ajp13
> 
> JkMount /siteos/* ajp13
> 
> 
> 
> JKMount /*.jsp ajp13
> 
> JKMount /*.xml ajp13
> 
> JKMount /servlet/* ajp13
> 
> </IfModule>
> 
> ------------------------------------------
> 
> 
> 
> apps-context.xml
> 
> ------------------------------------------
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <webapps>
> 
>     <!-- Setting special properties for /examples 
> 
>          ( as an example of overriding the defaults )
> 
>       -->
> 
> 
> 
>    <Context path="/siteos" 
> 
>             docBase="/sostest/siteos/www/htdocs" 
> 
>             debug="1" 
> 
>             reloadable="true" > 
> 
>               <SimpleRealm filename="conf/users/example-users.xml" />
> 
>               <LogSetter name="siteos_tc.log" 
> path="logs/siteos.log" />
> 
>               <LogSetter name="siteos_servlet_log" 
> 
>                          path="logs/servlet_siteos.log" 
> 
>                          servletLogger="true"/>
> 
>   </Context>
> 
>  <Context path=""
> 
>             docBase="/sostest/siteos/www/htdocs"
> 
>             debug="1"
> 
>             reloadable="true" >
> 
>               <SimpleRealm filename="conf/users/example-users.xml" />
> 
>               <LogSetter name="siteos_tc.log" 
> path="logs/siteos.log" />
> 
>               <LogSetter name="siteos_servlet_log"
> 
>                          path="logs/servlet_siteos.log"
> 
>                          servletLogger="true"/>
> 
>   </Context>
> 
> </webapps>
> 
> ------------------------------------------
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message