| Author |
Regarding retrieving of session information
|
yekkala krishna
Ranch Hand
Joined: Mar 04, 2007
Posts: 105
|
|
Hi,
In my application we are using servlets and spring MVC technologies.
In Spring Controller class i am setting attributes for a session in the below manner:
req.getSession().setAttribute("GSAM_USER_ID", enteredUser);
And in our servlet if i retrieving this attribute in the below manner:
String userId =(String) session.getAttribute("GSAM_USER_ID");
It getting userId as null.could you please suggest why it's retrieving as null.
Thanks in advance.
regards,
rama
|
 |
Prasad Krishnegowda
Ranch Hand
Joined: Apr 25, 2010
Posts: 365
|
|
Are you sure, your spring controller class is excecuted, before calling the servlet... Also, can you please tell us how you are getting your session in the servlet..
P.S: when you are using spring MVC, i don't know, why you are going for servlets...
|
Regards, Prasad
SCJP 5 (93%)
|
 |
 |
|
|
subject: Regarding retrieving of session information
|
|
|