myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sertic Mirko, Bedag" <Mirko.Ser...@bedag.ch>
Subject AW: Access Component tree from a Servlet Filter
Date Thu, 14 Feb 2008 15:44:42 GMT
Thank you a lot.
Thats a very good tip.

I am experimenting to implement the following usecase:

Before a given view is displayed, I want to intercept the rendering, check if
Access is allowed. If its allowed, I want to render the response. If not, I want
to forward the user to a login page.

Currently, I am using a PhaseListener. It is running for the RENDER_RESPNSE phase.
Now, now do I implement the tricky part? I know if a user is allowed the view
a given view, but how do I cancel rendering and forward to another page?

Is there any other good solution available for this usecase?

Thanks a lot
Mirko


-----Urspr√ľngliche Nachricht-----
Von: simon.kitching@chello.at [mailto:simon.kitching@chello.at] 
Gesendet: Donnerstag, 14. Februar 2008 12:35
An: MyFaces Discussion
Betreff: Re: Access Component tree from a Servlet Filter

Sertic Mirko, Bedag schrieb:
>
> Hi@all!
>
> I need to access the component tree from a sevlet filter, e.g. if there
>
> is a view to restore. I also need to detect if there is no view to
> restore,
>
> and I need to do that within a ServletFilter. Is this possible, and how
>
> should I do that? Are there any examples available?
>

http://wiki.apache.org/myfaces/AccessFacesContextFromServlet


Mime
View raw message