It's not a secret anymore!
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
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: 63844

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!