The request dispatcher is used for receiving requests from the client and sending them to any resource (such as a servlet, HTML file, or JSP file) on the server.
The request dispatcher is used for receiving requests from the client and sending them to any resource (such as a servlet, HTML file, or JSP file) on the server. The most common approach is forward or include resource to the client.
The servlet container creates the RequestDispatcher
object, which is used as a wrapper around a server resource located at a particular path or given by a particular name.
See RequestDispatcher API docs for details.