Saving / loading data with SessionBean
Hi,
I have two pages:
- user login page
- user menu page
The user passes by the login page and, if OK, I store a serializable User obj in the session bean:
User usr = etc
SessionBean sb = getSessionBean();
sb.saveData(AppConsts.BEAN_USER, usr);
Later, in the menu page, I try to access it:
SessionBean sb = getSessionBean();
User usr = (User) sb.retrieveData(AppConsts.BEAN_USER);
For some reason I dont know, I always get null when trying to retrieve that object in the menu page!!!
Right after sb.saveData, I verified that indeed sb.retrieveData gets the right obj.
Any idea of what's going on? What do I miss here?
Thanks, Don