Home Servlets sendRedirect

Related Tutorials


 
 

Share on Google+Share on Google+

sendRedirect

Advertisement
In send Redirect whenever the client makes any request it goes to the container, there the container decides whether the concerned servlet can handle the request or not.

sendRedirect

     

In send Redirect whenever the client makes any request it goes to the container, there the container decides whether the concerned servlet can handle the request or not.   If not then the servlet decides that the request can be handle by other servlet or jsp. Then the servlet calls the sendRedirect() method of the response object and sends back the response to the browser along with the status code. Then the browser sees the status code and look for that servlet which can now handle the request.   Again the browser makes a new request, but with the name of that servlet which can now handle the request and the result will be displayed to you by the browser. The URL will have the address of the new servlet. In all this process the client is unaware of the processing.

Servlet Redirect forces the browser to do work.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 19, 2007

Related Tutorials

Discuss: sendRedirect   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
Saket
March 18, 2012
sendRedirect to a given id ob the target

How do i redirect to a given id of a element on d target page??
DMCA.com