Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Sessions


Message #1 by "Burger, Derick" <BurgerD@f...> on Mon, 14 May 2001 15:28:17 +0100
Hi there,

I am calling a servlet from a simple JSP page. I pass 2 variables through to
the servlet. Manipulate the values and pass the values through to a session
created as follow:

HttpSession userSession = req.getSession(true);

I then use the setAttribute( object, value ) method to populate the session.
From here I redirect to a JSP page using the
RequestDispatcher.forward(req,res) method.

The process flow logic works but the session value is lost. I have used
debug statements and they produced DIFFERENT session ids for the 3 different
'pages' (JSP --> Servlet --> JSP)

How do I keep the session id intact? What am I doing wrong.

Thanks
DB

  Return to Index