cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CraigGulliver" <>
Subject Classpath Problems
Date Thu, 13 Oct 2005 06:27:15 GMT
Hi All,

I have a Jetty and Cocoon setup and I want to use the JspServlet for 
compiling my jsps in cocoon.  I have an issue where by the class path of the 
JspServlet is not as I expect.  The servlet seems to be using the parent 
classloader supplied by Cocoon to build it's class path.  However there's an 
issue with the Cocoon implementation that makes this problematic.  The 
CompilingClassLoader does not extend the URLClassLoader, which the 
JspServlet is expecting.  So I want to work around this problem by 
specifying the class path through other means.  And the end result is that I 
want the JspServlet to have a classpath that includes the classes from the 
Cocoon web app.

My first attempt was to move the servlet configuration from the 
webdefaults.xml into the web descriptor for the cocoon web app.  I thought 
that the JspServlet would use the correct classpath since it would be loaded 
within the web app of interest.  I read that the classpath should be 
"Created dynamically based on the current web application", which is 
directly from jetty documentation.  This did not work or affect the class 
path in any way.

The second attempt was to explictly specify the classpath for the jsp 
servlet using an init-param, the classpath.  This does not work either.  I'm 
convinced that I have jetty mis-configured, either that or I've interpretted 
the documentation incorrectly.

Aside from rewriting some code in Cocoon, which I'm not willing to do, I 
don't see any other solutions. I don't understand why the JspServlet is not 
using the correct classpath. I've spent countless hours on this and I'm in 
need of help.  Is there anyone that can help me, shed some light on the 
problem, or point me in the right direction?

I am using Jetty 5.1.5, including jasper 2 from tomcat, and Cocoon 2.1.7.

Here's my jetty xml configuration file:
<Configure class="org.mortbay.jetty.Server">
  <Call name="addListener">
      <New class="org.mortbay.http.SocketListener">
        <Set name="Port"><SystemProperty name="jetty.port" 
        <Set name="MinThreads">5</Set>
        <Set name="MaxThreads">100</Set>
        <Set name="MaxIdleTimeMs">30000</Set>
        <Set name="LowResourcePersistTimeMs">5000</Set>
  <Call name="addWebApplication">
    <Arg><SystemProperty name="webapp" default=""/>webapps/cocoon</Arg>
    <Set name="defaultsDescriptor"><SystemProperty name="home" 
    <Set name="extractWAR">false</Set>

And here's JspServlet configuration from the web.xml:

I can provide more information if necessary.

All help is very much appreciated.  Thanks in advance.

Craig W Gulliver 

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

View raw message