aspose file tools*
The moose likes Servlets and the fly likes Usage of sendRedirect()? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Usage of sendRedirect()?" Watch "Usage of sendRedirect()?" New topic
Author

Usage of sendRedirect()?

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

sendRedirect() method is working with client...so if you redirect to B.jsp

still you able to access session in B.jsp!!! but you can not access request object!!

please anyone can tell me the usage of sendRedirect()

thanks & regards,
seetharaman
[ April 27, 2008: Message edited by: David O'Meara ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

sendRedirect() sends a message to the browser asking it to load the new link, which may be either local or remote.

Consider the following, which processes some data then displays the menu page:

Once they get back to the main page, if they reload the page the original form gets called and processes the data again when the person just wanted to refresh the page. The display is still coupled with the previous processing.

If the client reloads, they get the index page again.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

FYI, Bear removed the multiple exclamation marks from your topic, I re-edited to make it meaningful.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Thanks a lot, David O'Meara
deepak kabra
Greenhorn

Joined: Apr 28, 2008
Posts: 1
sendRedirect() method is use for sending new request to the client.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Usage of sendRedirect()?