Hey guys,

I would like to access a session scoped backingbean ("user") from an actionListener... I'm currently doing something along the lines of:

FacesContext context = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
HttpSession session = request.getSession();
UserBean user = (UserBean)session.getAttribute("user");

Is there a better way?

Thanks,

Bobby Rosenberger

Reply via email to