| Author |
Session tracking
|
Sean Thornton
Greenhorn
Joined: Jun 18, 2002
Posts: 5
|
|
|
How does JSF maintain a session? I know that when working with the servlet API your supposed to call request.getSession(). Does JSF do this for you automatically?
|
 |
Varun Khanna
Ranch Hand
Joined: May 30, 2002
Posts: 1400
|
|
|
JSF is built over Servlets/JSP. It uses HttpSession only.
|
- Varun
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Yes, JSF uses HttpSession, but doesn't give you transparent access to it. Everything in JSF is handled via the managed-beans. So if you want something stored in the session give the managed-bean session scope. IF you just can't live without manipulating the HttpSession directly you can do: session = (HttpSession)FacesContext.getCurrentIstance().getExternalContext().getSession(); you can also get things like the request and response objects as well from the external context.
|
 |
 |
|
|
subject: Session tracking
|
|
|