Retrieve JSF session from a servlet
Hi all,
I have a downloadservlet where I need to check permission. Therefore I retrieve a backing bean by creating a FacesContext and get the bean from it like this:
FacesContext ctx = this.getFacesContext(request, response);
VariableResolver vr = ctx.getApplication().getVariableResolver();
getLog().debug("Got variableResolver: " + vr);
WebSession ws = (WebSession) vr.resolveVariable(ctx,"webSession");
However, because of an apparent JSF bug this doesn't always work.
Therefore: is it actually possible to retrieve jsf session variables (like the WebSession bean) from a servlet?
Thanks,
Steven

