What is Request Dispatcher?

Solution:

Servlet Request Dispatcher is an interface whose implementation defines that an object can dispatch requests to any resource (such as HTML, Image, JSP, Servlet etc.) on the server. Another advantage of this interface is that it is used in two cases:

  • To include the response of one Servlet into another (i.e. the client gets the response of both Servlets)
  • To forward the client request to another Servlet to honor the request (i.e. the client calls a Servlet but the response to client is given by another Servlet)
0 answers