aspose file tools*
The moose likes Servlets and the fly likes redirect() vs getRequestDispatcher() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "redirect() vs getRequestDispatcher() " Watch "redirect() vs getRequestDispatcher() " New topic
Author

redirect() vs getRequestDispatcher()

Shubha Krishna
Greenhorn

Joined: Aug 18, 2006
Posts: 13
Can anybody help me to know the difference between response.redirect() and request.getRequestDispatcher()? Thanks...
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61064
    
  66

One is used to perform a forward or include, the other a redirect.

Perhaps a more expansive question would yield a more expansive answer.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Consider Paul's rocket mass heater.
 
subject: redirect() vs getRequestDispatcher()