#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    16
    Rep Power
    0

    Question 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?
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    16
    Rep Power
    0
    thanks a lot. I'll try that

IMN logo majestic logo threadwatch logo seochat tools logo