wood burning stoves 2.0*
The moose likes Servlets and the fly likes Request Dispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Request Dispatcher" Watch "Request Dispatcher" New topic
Author

Request Dispatcher

Narahari Raidurg
Greenhorn

Joined: Feb 07, 2001
Posts: 3
what is Request Dispatcher? Is there any diff bet it & sendredirect?
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
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.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
 
jQuery in Action, 2nd edition
 
subject: Request Dispatcher