wood burning stoves 2.0*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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: 1510
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
 
Don't get me started about those stupid light bulbs.
 
subject: Difference between Sendredirect and Requestdispatcher.forward