This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes does sendRedirect() lose session ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "does sendRedirect() lose session ?" Watch "does sendRedirect() lose session ?" New topic

does sendRedirect() lose session ?

Artemesia Lakener
Ranch Hand

Joined: Jun 21, 2005
Posts: 162
In servlet, I need to check some information user enters in a form, if I find some error, I use "sendRedirect()" to an error page which says "One or more fields are wrong, click back button to complete." Now let's forget about the design of this, my question is --- This servlet is in the middle of a "session", if I use this redirect method to lead user to a new page, then when they click back button to come back, will they still be in that session ? any problem with it ?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

No problem.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: does sendRedirect() lose session ?
It's not a secret anymore!