aspose file tools
The moose likes Servlets and the fly likes RequestDispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher" Watch "RequestDispatcher" New topic


Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 749
What's the use of it? I've seen people use it to forward a user to another page... But I've also seen many people not use it and just use the response.sendRedirect() method provided by the response object in the servlet doPost() and doGet() methods. What's the purpose of RequestDispatcher? Thanks!

SCJP 1.5 -
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

You should search this forum for threads comparing foward and sendRedirect, this should answer your question.

If I get a chance I'll see if I can find a good one for you.

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

There is one here
I agree. Here's the link:
subject: RequestDispatcher