my dog learned polymorphism*
The moose likes JSP and the fly likes Difference between <jsp:forward> and RequestDispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Difference between <jsp:forward> and RequestDispatcher" Watch "Difference between <jsp:forward> and RequestDispatcher" New topic
Author

Difference between <jsp:forward> and RequestDispatcher

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
I want to know the difference between <jsp:forward> standard action and RequestDispatcher as both are used to forward the request.


I am slow but sure
Jagdish Hatagale
Ranch Hand

Joined: Apr 07, 2010
Posts: 33
With RequestDispatcher you can pass the request object for next page,
means you pass the control and data with the help of RequestDispatcher, but with jsp:forward you cant sent the request object you just transfer the control to next page.
Venkata Kumar
Ranch Hand

Joined: Apr 16, 2008
Posts: 110

Both are same. When <jsp:forward> is translated to servlet then requestdispatcher is used to forward the request.


SCJP 5.0, SCWCD 5, preparing for SCDJWS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between <jsp:forward> and RequestDispatcher
 
Similar Threads
RequestDispatcher & forward method
Difference between requestdispatcher and jsp:forward
Diff btw response.sendRedirect, jsp:forward and RequestDispatch .forward methods?
Differences
Difference between jsp:forward and forwardaction in struts