I gave you the resources already, but to allow you to be lazy :) here you
are:

http://jsf-comp.svn.sourceforge.net/viewvc/jsf-comp/trunk/extensions/jsfExt/src/net/sf/jsfcomp/ext/onload/OnLoadPhaseListener.java?view=markup

http://tinyurl.com/2gmx5e

-Andrew

On Thu, Feb 14, 2008 at 10:16 AM, Sertic Mirko, Bedag <[EMAIL PROTECTED]>
wrote:

>  I know Acegi. The tricky thing is that for THIS special application, i
> cannot rely on things stored in the HttpSession due to
>
> Load balancer issues. The authorization information is stored in a request
> scope backing bean managed with client state
>
> saving. I don't want to discuss sense or nosense of this architecture. I
> just need a solution for the described usecase
>
> below, without impacting existing views and other parts of the application
> too much. So I was thinking about a PhaseListener.
>
> The key point is : is it possible to implement a quick hack for this
> usecase with a PhaseListener, and how?
>
>
>
> *Von:* Andrew Robinson [mailto:[EMAIL PROTECTED]
> *Gesendet:* Donnerstag, 14. Februar 2008 17:21
> *An:* MyFaces Discussion
>
> *Betreff:* Re: Access Component tree from a Servlet Filter
>
>
>
> Why reinvent the wheel? There are technologies that already do this.
>
> See here for "on-load" functionality:
>
>
> http://wiki.apache.org/myfaces/Execute_action_on_page_load?highlight=%28onload%29
>
> Seam has page security:
>
> http://docs.jboss.com/seam/2.0.1.GA/reference/en/html/security.html
>
> ACEGI seems to be pretty popular on the list:
>
> http://wiki.apache.org/myfaces/JSF_and_Acegi
>
> -Andrew
>
> On Thu, Feb 14, 2008 at 8:44 AM, Sertic Mirko, Bedag <
> [EMAIL PROTECTED]> wrote:
>
> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 14. Februar 2008 12:35
> An: MyFaces Discussion
> Betreff: Re: Access Component tree from a Servlet Filter
>
> Sertic Mirko, Bedag schrieb:
> >
> > [EMAIL PROTECTED]
> >
> > 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
>
>
>

Reply via email to