| Author |
The Session
|
John Miller
Greenhorn
Joined: May 24, 2001
Posts: 12
|
|
Hi, one of my servlets use the following code (session.putValue("accesslevel", "10"), session is declared with HttpSession = request.getSession(). If if want to access the value I just placed into the session in another servlet what do i do? At the moment I'am using session.getValue("accesslevel"), but it only return null. Points to note: I know getValue() and putValue() are decrecated, I tried using setAttribute() and getAttribute but the results where the same. Im using JRUN and everyting is set up perfecting. Im using Internet Explorer 5.5. Thanks
|
 |
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
|
|
If you want to creatre the session new use HttpSession = request.getSession(true), else to get to the current session if there is one, use HttpSession = request.getSession(false). I am not sure if you can create/access a session without a boolean parameter to the getSession method. Bosun
|
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
|
 |
 |
|
|
subject: The Session
|
|
|