This content has been marked as final.
Show 2 replies
-
1. Re: Accessing HttpSession in Jboss Seam
smithbstl Oct 3, 2007 1:19 PM (in response to ojio_bis)I don't think this is really a Seam issue but rather JSF
FacesContext context = FacesContext.getCurrentInstance(); HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
Of course you can use a Seam API to get the FacesContext
org.jboss.seam.core.FacesContext -
2. Re: Accessing HttpSession in Jboss Seam
matt.drees Oct 3, 2007 1:36 PM (in response to ojio_bis)You can even inject (non-Seam) session values into your Seam components:
@In("my_session_object_key") MySessionObjectType mySessionObject;
The cool thing about this is if you later decide to move your object to a different scope (eg conversation), you don't have to change this code at all!