cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierpaolo Fumagalli <>
Subject Re: cocoon and JServ repositories : severe flexibility problem
Date Sat, 04 Mar 2000 02:16:29 GMT
Fabien Campagne wrote:
> Stefano Mazzocchi wrote:
> > > Fabien Campagne wrote:
> > > I am looking at the feasability of mixing Java servlets with Cocoon/XSP.
> > > We have a web service built with the servlet API that we would need
> > > to extend with XSP pages. During development, we need the ability to
> > > compile and execute XPS pages which use code defined in (a) package(s) stored
> > > in the JServ repository. The package is there because several developers
> > I don't think this is that easy. It's also a classloading issue. I
> > wonder if this can be JServ abstracted... if not.. we are in serious
> > trouble since this requires a Servlet API change!!!
> I quickly realized that this solution was not enough. The solution
> requires to obtain the classes from exactly the same class-loader
> as JServ does. If not, the static variables defined in the servlet
> environment will not be available to XSP.
> I experimented an ugly hack: patch JServ to obtain the classloader,
> and patch cocoon to install JServ's classloader instead of the
> one used normally. Then you add the cocoon repository to the JServ
> repository for the zone that serves both servlets and XSP.
> I also changed the java.class.path to to make
> it distinct from the CLASSPATH of the jserv engine that runs Cocoon.
> I did not want to obtain the whole cocoon distribution and compile
> it so I just recompiled the XSPJavaProcessor.class file and updated
> it in the jar.
> The results were mitigated. With cocoon 1.6, I obtained the desired
> behabiour but also some ClassNotFound exceptions the second time
> I was accessing the pages. I guess there is a relationship to the
> caching mechanism that I do not  know. With Cocoon 1.7, I obtained the
> ClassNotFound exceptions immediately.
> Of course, because this was just a tentative, I did not consider security
> issues at this step and I cannot offer a clean design. I just thought you
> might be interested.

I think I understand where the problem resides, and how the classloader
is implemented in JServ... I'm considering right now XSP for Cocoon 2.0,
and starting to approach the problem. I'll let you all know what are my
feelings on this, as soon as I have some working "pseudocode"... :)


-          P              I              E              R          -
stable structure erected over water to allow the docking of seacraft
<>    <>
- ApacheCON Y2K: Come to the official Apache developers conference -
-------------------- <> --------------------

View raw message