cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: multiple webapps sharing XSPs
Date Wed, 09 Oct 2002 18:55:13 GMT
Ryan Agler wrote:

>Can a guru out there give me a hand?

The problem with loggin comes from the fact that in your setup 
org.apache.log classes are loaded once and shared among contexts, and 
from the fact that logging uses some static methods/variables. Example 
(from CocoonServlet):

        final Logger logger = 

Thus, all instances will share same instance of the log -> all instances 
will write to same log file.

Cannot comment on XSP problem right now. But try latest 2.0.4-dev 
version: it has one patch for XSP reloading problem.


>I recently installed Tomcat 4.1.12 with the latest Cocoon CVS.  I have 4
>Cocoon webapps which share the cocoon jars, are all in
>$TOMCAT_HOME/shared/lib.  When I fire up Tomcat, the webapps get
>initialized and the normal log files appear under each one's
>It starts getting crazy here -- All 4 webapps seem to write their logs
>to ONE of the webpps' WEB-INF/logs when I start accessing pages.  On top
>of that, say webapp1 has a page called "test.xsp". I access "test.xsp",
>it compiles just fine and the .class file appears in $TOMCAT_HOME/work,
>etc.  However, if the sitemap for webapp2 matches "test.xsp", the page
>from webapp1 gets pulled from webapp1's cache and used!?  No .class file
>gets compiled for webapp2, unless I explicitly go in and "touch"
>webapp2's test.xsp so cocoon thinks it has been modified.
>I found that this only happens if the cocoon jars are shared (i.e. in
>$TOMCAT_HOME/shared/lib), as opposed to each webapp having copies of the
>jars in WEB-INF/lib.  I have made the usual precautions of deleting the
>work directory before starting Tomcat each time.
>I suspect this has something to do with contexts?  I say that because
>the log files for all 4 webapps are all being written to a single
>${context-root} (from logkit.xconf).  Here is a snippet from my
>server.xml if you can see anything wrong:
><Host name="" debug="0" appBase="webapps"
>   <Context path="" docBase="webapp1" debug="0"/>
>   <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp1/users.xml" />
><Host name="" debug="0" appBase="webapps"
>   <Context path="" docBase="webapp2" debug="0"/>
>   <Realm className="org.apache.catalina.realm.MemoryRealm"
>pathname="webapps/webapp2/users.xml" />
>Thanks much,
>Ryan Agler

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message