File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session with sendRedirect() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session with sendRedirect()" Watch "session with sendRedirect()" New topic

session with sendRedirect()

naresh babu

Joined: Sep 04, 2007
Posts: 8

When I redirect the request from a Servlet to a jsp using sendRedirect() method, new request and response objects will be sent to jsp file. In such scenario, does the existing implicit session object will avialble in the jsp or is there any possibility does the container will create a new session object for the jsp.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

As long as both pages are part of the same context, they will both use the same session.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: session with sendRedirect()
It's not a secret anymore!