myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bansi <mail2ba...@yahoo.com>
Subject How to pass Session Object from JSF to Spring
Date Wed, 16 May 2007 17:15:57 GMT

In JSF LoginBean i am retrieving userId and Role from the Database and
storing in HttpSession 
Here is the snippet from JSF Backing Bean

Code:
public class LoginBean implements Login {
//Logic to retrieve userId & Role from database
HttpSession session =
               (HttpSession)
FacesContext.getCurrentInstance().getExternalContext()
                                         .getSession(true);
           session.setAttribute("userId", userId);   
        session.setAttribute("userRoles", userRoles)

As a next step how should i pass the HttpSession object to the Spring Layer
so that any business Bean in the Spring layer can access userId and
userRoles

Any pointers/suggestions will be highly appreciated

Regards
Bansi

-- 
View this message in context: http://www.nabble.com/How-to-pass-Session-Object-from-JSF-to-Spring-tf3765954.html#a10646275
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message