cocoon-users mailing list archives

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

It sounds a bit strange to me If can't get from inside a ServletFilter all
the component I can use inside a flowscript

I mean I have built a framework and I am using it inside flowscript thanks
to components defined in cocoon.xconf, it sounds strange I can't use them
inside a Filter

I mean I have this .xroles
  <role default-class="com.xxx.AvalonXXXImpl"
	name="com.xxx.AvalonCommandExecutor" shorthand="cmdExe">
  </role>

and I use this inside flowscript
	cocoon.getComponent("com.xxx.AvalonCommandExecutor");

I'd like to do the same inside the Filter

thks
Leo

> -----Messaggio originale-----
> Da: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
> Inviato: venerdì 19 gennaio 2007 11.34
> A: users@cocoon.apache.org
> Oggetto: Re: I: Reading Cocoon component from Servlet Filter
>
>
> On 19.01.2007 11:05, Leonardo Battagli wrote:
>
> > 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]
>
> I guess that are only servlet name and servlet class and it is no
> context attribute.
>
> > So I suppose
> > cocoon =
> >
> (org.apache.cocoon.servlet.CocoonServlet)(this.servletContext.
> getAttribute("
> > Cocoon"));
> > was a great solution, but it is not
>
> Since you don't have access to the servlet in the filter AFAIK you
> probably have no chance to access it.
>
> Regards
> Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


Mime
View raw message