aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "session with sendRedirect()" Watch "session with sendRedirect()" New topic
Author

session with sendRedirect()

naresh babu
Greenhorn

Joined: Sep 04, 2007
Posts: 8
Hi

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.

Thanks,
Naresh
Ben Souther
Sheriff

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: session with sendRedirect()