What do you mean by Request Dispatcher in Servlet? Also explain its methods.

RequestDispatcher interface defines an object that can dispatch the request to resources like HTML, JSP, and Servlet, on the server. This interface provides two methods

forward (ServletRequest request, ServletResponse response) will forward a request from Servlet to another resource such as a Servlet, JSP, or HTML, on the server.

Include (ServletRequest request, ServletResponse response) will include the content of a resource such as Servlet, JSP, or HTML, in the response.

Suggest An Answer

No suggestions avaliable!

Related Interview Questions