cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Battagli" <leonardo.batta...@cedac.com>
Subject I: Reading Cocoon component from Servlet Filter
Date Fri, 19 Jan 2007 10:05:15 GMT

Hi,

I tried to look at source code for example, but didn't find anything

Basilarly all I want to do is way to get the 'cocoon' variable we usually
have available inside flowscript.
We usualyy use it to get components [cocoon.getComponent("componentRole");]

I have to retrieve the same "componentRole" also inside a Servlet Filter.

If you start cocoon with servlet-debug I can see that inside
'ServletContext' variable there is
Cocoon=[org.apache.cocoon.servlet.CocoonServlet]

So I suppose
cocoon =
(org.apache.cocoon.servlet.CocoonServlet)(this.servletContext.getAttribute("
Cocoon"));
was a great solution, but it is not

Leonardo



> I want it in a servlet filter, so I mean it is a java class
>
> I need 'cocoon' since I need to retrieve some component I
> have configured in cocoon.xconf, and I suppose I can find
> those in 'Cocoon' main servlet

look at cocoon source code for example, you need to lookup a role with the
manager. Check out java part only of cocoon if you want, and search for
"lookup"

Also, plz keep using the public mailinglists. These mails are indexed and
archived, and are an essential part of a community,

Regards Ard



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


Mime
View raw message