RequestDispatcher

A RequestDispatcher object can forward a client’s request to a resource or include the resource itself in the response back to the client. A resource can be another servlet, or an HTML file, or a JSP file, etc. You can also think of a RequestDispatcher object as a wrapper for the resource located at a given path ...

forward and sendRedirect

Whenever there is a request from the client (or browser) to the server, the server container creates two objects 1. request 2. response and pass these objects to the servlet along with other parameters if needed.    S.No.  RequestDispatcher.forward  HttpServletResponse.sendRedirect  1. the request is forwarded to other resource(say B) in the same context, B does some ...