February 28th, 2003, 06:00 PM
Session from JSP to JSP
Do I have to pass the session from JSP to JSP as a parameter to keep it or it does it automatically?
Because i have a login page and i put a parameter in the request, and when i forward to other jsp, that parameter is not in the request anymore.
Can anyone tell me why?
March 1st, 2003, 10:52 AM
When you put the parameter in the request, I assume you use setAttribute()? If so, on the next page you have to use getAttribute() to retrieve it, getParameter()( will not work. Is this what is happening?
Another thing that might be happening is if you are using response.sendRedirect() instead of getServletConfig().getRequestDispatcher().forward(). sendRedirect does not carry the request object over. Only the requestDispatchers forward does.
March 1st, 2003, 03:41 PM
thanks a lot. I'll try that