cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Germeroth <andi.germer...@SiteOS.de>
Subject Re: Tricky configuration problem of Tomcat 3.3 - Cocoon 1.8.1 - Apache 1.3.19
Date Mon, 03 Dec 2001 18:16:04 GMT
Hello Larry, hello all

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

I do a simple "Include" in the httpd.conf

Include /sostest/tomcat/conf/jk/mod_jk.conf

I don't use the autogenerated mod_jk.conf. My mod_jk.conf was at the
bottom of the first message.
Here again :

-------------
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
JkMount /examples/* ajp12
# AddType text/xml .xml

JkMount /siteos ajp13
JkMount /siteos/* ajp13
#JkMount /siteos/*.xml ajp13
#JKMount /siteos/servlet/* ajp13
JKMount /*.xml ajp13
JKMount /*.jsp ajp13

JKMount /servlet/* ajp13
</IfModule>
-------------


> 
>     forwardAll="false"
> 
> 
>     noRoot="false"
> 

I think this configurations you describe have the same output in the
auto generated
"mod_jk.conf" that in my "mod_jk.conf".
The entries

JKMount /*.jsp ajp13
JKMount /*.xml ajp13

instruct apache only to forward *.xml / *.jsp  files to Tomcat. 
The problem is, thar the JSP files work (i.e.
http://servername/test.jsp) and the XML Files do not work (i.e.
http://servername/test.xml) , so in my opinion the
mod_jk.conf is ok.

The entry in the jk.log 
------------------
[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
-------------------
proves that mod_jk handles the request correct.

I noticed a very strange effect:

When I first access 

http://servername/siteos/standard.xml

and after that access

http://servername/standard.xml

it works also, this means when the document is in the Cocoon Cache (due
to the first access)  and has not to be processed but, printed out from
Memory... 

Perhaps something in Cocoon ?

For info the web.xml :
----------------------
<web-app>
 <servlet>
  <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
  <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
  <init-param>
   <param-name>properties</param-name>
   <param-value>cocoon.properties</param-value>
  </init-param>
 </servlet>

 <servlet-mapping>
  <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
  <url-pattern>*.xml</url-pattern>
 </servlet-mapping>
----------------------

Any ideas ?

Best Regards

Andi

> > -----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>
> >


--
Andreas Germeroth

SiteOS AG
Weissenfelderstr. 3
85551 Heimstetten (M√ľnchen)

Tel.    +49 (0)89 90 77 66 - 00
Mobil   +49 (0)172 833 83 77
mailto:andi.germeroth@siteos.de

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message