cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: portal question - custom classloaders
Date Fri, 01 Sep 2006 06:54:58 GMT
Filip Defoort wrote:
> Hi,
> I'm working with the cocoon portal, and I'm starting cocoon via a custom 
> classloader
> ( <classloader class="..." /> in cocoon.xconf ) to make a number of 
> dynamically
> assembled classes and a back-end service available to cocoon. So far so 
> good,
> all works. My app starts; cocoon starts after that, and the portal works.
> The problem I have is that I need to make my portlets (JSR-168 based; 
> implementation
> in classes loaded by my custom classloader) available to the cocoon portal.
> I've put them in cocoon/WEB-INF/portlet.xml, but nothing happens. It 
> seems that
> I also need to put them as separate servlets in cocoon/WEB-INF/web.xml, 
> but if
> I do that, they're using the regular classloader, which doesn't have the 
> implementation
> and I'm getting NPE's (and looking at the sources, it's on the class 
> resolution).
> I've tried to have the classloader that starts the cocoon webapp be 
> swapped out
> by my custom classloader, but that seems to create all kinds of 
> conflicts when starting
> cocoon.
> Anybody any ideas on how to accomplish this ?
I guess it's not easy to do :) Now, putting your jsr-168 based portals
into the cocoon webapp is a proprietary way and not standard conform.
Usually, you should put your portlets into an own webapp (which has an
own classloader). So perhaps this might help you.

In the case, that you need/want to run those portlets in the cocoon
webapp, you could try to create a wrapper for the portlet servlets. The
Cocoon portal uses Pluto and Pluto requires a servlet for the deployed
portlets; so you could write a wrapper for this servlet which gets the
classloader from Cocoon and uses this classloader. You could share the
classloader between the portlets by putting it into the servlet context.
I'm not sure if this really works, but it sounds doable.


Carsten Ziegeler - Open Source Group, S&N AG

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

View raw message