This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request Dispatcher

 
Narahari Raidurg
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is Request Dispatcher? Is there any diff bet it & sendredirect?
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The RequestDispatcher object handles over the ServletRequest from one servlet/JSP to another. And maybe to another, etc. until the response is sent to the client.
A HttpServletResponse.sendRedirect() tells the browser to request a different URI all by itself. Thus new URL shows up in the browser address area. With the RequestDispatcher this does not happen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic