aspose file tools*
The moose likes Servlets and the fly likes Difference between Sendredirect and Requestdispatcher.forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Difference between Sendredirect and Requestdispatcher.forward" Watch "Difference between Sendredirect and Requestdispatcher.forward" New topic
Author

Difference between Sendredirect and Requestdispatcher.forward

steffy john
Greenhorn

Joined: Sep 07, 2001
Posts: 25
Hi,
Can anyone please tell me what the exact difference between these 2 methods, I know that redirect is a call from browser and other from the server. Also sendredirect takes a roundtrip to reach the client. All these are theoretically okay, but somehow I am not digesting these. Can anyone please tell me what the difference is..
Thanks
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
forward is internal to the server. The client is unaware that a different page is being displayed. sendRedirect sends the client to another paged, so the client is aware of where it is being sent.


Matthew Phillips
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Search this forum. You will find several discussiions regaring this.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
steffy john
Greenhorn

Joined: Sep 07, 2001
Posts: 25
Thanks Mathew.
I shall serach the entire forum
Steffy
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Difference between Sendredirect and Requestdispatcher.forward
 
Similar Threads
sendRedirect vs RequestDispatcher.forward()
What is the difference between requestdispatcher and sendredirect?
sendRidirect vs Forward
Difference between forward() and sendRedirect()
Can anybody tell me the difference between sendRedirect & RequestDispatcher object?