webtier@glassfish.java.net

Re: [webtier] How to get a handle to an ELContext without an active FacesContext

From: <webtier_at_javadesktop.org>
Date: Thu, 05 Nov 2009 10:58:15 PST

Ok, thanks, that's pretty much what I thought.

So, in absense of accesing EL directly... I'd like to consider the following scenario:

Is there a way to forward a request so that it is *always* handled by Faces Servlet? (I'm guessing no.)

Basically what I am trying to accomplish is to intercept a URL coming in to the container (via a filter,) then forward that request to Faces, where FacesContext is naturally instantiated and ready for use.

I'd then like to use a Phase Listener to set the calculated ViewId into the ViewRoot before RESTORE_VIEW (either manually with the ViewHandler, or by doing another Servlet forward back to FacesServlet at the new ViewId,) thus changing the view that JSF is handling.

The issue is that I need Faces to process the first request where the viewId is unknown, so that I can gain access to the EL context. I'm trying to figure this out only so that I can avoid instantiating FacesContext in a filter -- which it looks like I might be stuck with.

Thanks,
Lincoln
[Message sent by forum member 'lincolnbaxter' (lincolnbaxter_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=370734