File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Difference between <jsp:forward> and RequestDispatcher" Watch "Difference between <jsp:forward> and RequestDispatcher" New topic

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:
subject: Difference between <jsp:forward> and RequestDispatcher
It's not a secret anymore!