cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Casey" <>
Subject Re: Cocoon and Spring
Date Thu, 01 Jun 2006 09:10:17 GMT
Great thanks heaps for that Jason. Thats pretty much what I thought was the
case with the MVCs. I am an XML processing fanatic, so I am heading Cocoon
all the way:-) It is interesting to see that Cocoon and Spring are getting
closer links. Lets hope it doesnt turn out like the whole hibernate fiasco!


On 6/1/06, Jason Johnston <> wrote:
> Mike Casey wrote:
> > Can anyone tell me the experiences they have had with running cocoon
> > with spring? In particular, how did you get Spring to run Cocoon and how
> > was this deployed under tomcat? Does the spring MVC framework get in the
> > way of things? Or could they possibly complement each other?
> The simplest integration is probably to initialize the Spring
> application context in web.xml with a ContextLoaderListener:
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener
> </listener-class>
> </listener>
> Then you can get access to the application context from anywhere you
> have a cocoon Context object, e.g. from flowscript:
> var appCtxt = cocoon.context.getAttribute(
> );
> var myService = appCtxt.getBean("myServiceBean");
> There are also other techniques for getting access to Spring managed
> services; do a search for "spring" at for
> some examples.
> The next major version of Cocoon (2.2 or 3.0, not sure what it will end
> up being labeled) has actually been changed so that it uses Spring
> internally for its component management, so the integration should be
> that much cleaner.
> In terms of Spring MVC, I don't know how it and Cocoon would play
> alongside each other, since Cocoon is itself an MVC framework.
> Personally I've never seen a need to use Spring MVC when I've got such a
> good one in Cocoon. :)  I'd be interested to hear if anyone else has had
> experience combining them though.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message