cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DURDINA Michal" <>
Subject RE: JSR-168 Portlets
Date Mon, 15 Nov 2004 08:37:42 GMT
> Carsten Ziegeler wrote:
> >I did get it running in Tomcat with just the Pluto libs in
> >lib/shared and it worked - it's a long time ago....
> >
> >Now, the better way imho would be if the portlets would
> >run "inside of Cocoon" rather than "inside of Tomcat".
> >So, you deploy your portlet wars into your Cocoon war
> >(or a totally different place) and you don't have to deploy
> >the portlets as usual web applications in your servlet 
> >engine. I think this should be possible, but of course
> >needs some work to be done.
> >
> >Apart from that, if you have any issues/questions/suggestions
> >about Pluto, just asked on the pluto mailing list ;)
> >
> >Carsten
> >  
> >
> Well, I like the idea of deploying them inside of Cocoon. I'm 
> not sure 
> why the Portlet spec says they should be web apps.

The spec says that the portlet applications are supposed to use existing servlet environment.
IMHO they wanted to use as much from existing servlet infrastructure as possible. That ended
in conclusion that every single portlet application should be packaged and deployed as servlet

> But I have good news.  I was able to get a portlet to work with the 
> portlet deployed as a war file and I didn't have to change 
> any code.  

First of all I am wondering why there are any problems with pluto.jar placed in "shared/lib".
We use it for pluto.jar for Cocoon-2.1.5 and pluto-1.0.1 and it's working correctly. Moreover
we also packaged both portal.war + portlet.war + pluto.jar into one enterprise application
(ear) and after few patches to cocoon it is working as well (patches been recently submitted
to bugzilla).

> simply put the pluto and portlet-api jars in Tomcat's common/lib 
> directory instead of shared/lib and that got rid of the 
> ClassNotFoundException.  I guess there is either a bug in 
> Tomcat or I am 
> not reading their documentation properly.

There might be some change in Tomcat. We are using Tomcat 4.1.27 and know nothing about Tomcat
5, but in Tomcat 4.1 classloader hierarchy is as of:

>From the picture there it is evident that "shared/lib" should be "good enough" placement
for all libraries that should be shared between deployed web applications (portal.war + portlet.war).
Only libraries that need to be "visible" also from container (cataline) should be placed to
"common/lib". Example for this can be custom Pricipal object shared between custom authentication
realm (that instantiate it) and web application (that is reading it).


View raw message