webtier@glassfish.java.net

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

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 05 Nov 2009 08:26:55 -0800

On 11/4/09 4:12 PM, Lincoln Baxter, III wrote:
> Is it possible to instantiate ELContext without an active FacesContext?
>
> I need to do some bean value injection / method invocation in a
> Filter, but I don't want to create an entire FacesContext to do the
> work. Suggestions? Am I stuck building a whole FacesContext?
>
I would recommend using the instance vended by FacesContext. If you're
using any
of the ELResolvers provided by JSF, there's a good chance that the
resolver relies on
the FacesContext being present via a call to
ELContext.getContext(FacesContext.class).

> Thanks,
> Lincoln
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>