You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Germeroth <ag...@siteos.de> on 2001/12/01 13:55:45 UTC

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>