You can't access the faces context in a servlet that isn't included
run from within the scope of the JSF servlet filter. You will need to
get the faces context factory and build a new one. I don't have an
example handy, but a google search should turn it up.

-Andrew

On 8/14/06, Eurig Jones <[EMAIL PROTECTED]> wrote:
I'm trying to do the above with the following. Usually this code works
fine in my beans:

(This code is within the doGet() method of the servlet)...

FacesContext c = FacesContext.getCurrentInstance();
Application application = c.getApplication();
SessionBean session = (SessionBean)
application.createValueBinding(#{sessionBean}).getValue(c);
Game game = session.getCurrentGame();

The first line is not fetching the current FacesContext instance, just
giving me a null.

How can I get the value from the EL from within the servlet?

Regards,
Eurig Jones
www.eurig.co.uk

Reply via email to