[jboss-user] [JBoss Seam] - FacesContext is null at Session startup???

monkeyden do-not-reply at jboss.com
Mon May 14 14:07:32 EDT 2007


I have the following JavaBean which starts up with the session:

@Startup
  | @Scope(SESSION)
  | @Name("userSession")
  | public class UserSession implements Serializable {
  | ...
  | 
  |     @Create
  |     public void create(){
  |         FacesContext ctx = FacesContext.getCurrentInstance();
  |         ExternalContext ext = ctx.getExternalContext();
  |         HttpServletRequest req = (HttpServletRequest)ext.getRequest(); 
  |     }
  | ...
  | }

I have thought through the request lifecycle and can't see a reason why FacesContext would be null at this stage, but it is.  

Ideally, I'd like to log the user in here if they have Remember Me turned on.  

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045574#4045574

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045574



More information about the jboss-user mailing list