cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Perez" <hak...@gmail.com>
Subject Re: Accessing a cocoon SourceResolver from another servlet ?
Date Fri, 08 Sep 2006 07:59:04 GMT
> If you would like to use cocoon-trunk that is very easy:
> ApplicationContext context =
> WebApplicationContextUtils.getRequiredWebApplicationContext(
> servletContext );
> SourceResolver resolver = context.getBean( SourceResolver.ROLE );

wow. great. I'm already using Spring behind Cocoon, I guess I should
give the trunk a try.. any up-to-date docs on how to build it,
especially with the required maven configuration ?

> I do not know if there is a possibility to get an internal cocoon
> component in 2.1.x.

well, under 2.1.9 I found the CocoonBean helper class, which is what
cocoon-client seems to use. so far so good, its processURI(pattern,
outputstream) method works as expected, but processURI(pattern,
contenthandler) (I need to receive that pattern result thru SAX) does
not, throwing an NPE on every attempt.

I tracked the exception down to
o.a.c.environment.AbstractEnvironment#initComponents() :

this.sourceResolver =
(org.apache.excalibur.source.SourceResolver)this.manager.lookup(org.apache.excalibur.source.SourceResolver.ROLE);

does CocoonBean really support writing to a SAX ContentHandler, or is
my ContentHandler object "badly" initialized ? there's really no
documentation about this helper class :(

thanks,
laurent

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message