RequestDispatcher object is used

Options
- to include other resources
- to include an image
- to include xml object
- to include e-mailing response


CORRECT ANSWER : to include other resources

Discussion Board
RequestDispatcher

The RequestDispacher is an interface that provides the facility of dispatching the request to another resource in the form of html, servlet or jsp. It can also be used to include the content of antoher resource. This interface can be used for servlet collaboration. The RequestDispatcher interface includes the following two methods:

public void forward(ServletRequest request,ServletResponse response)throws ServletException,java.io.IOException:Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server.

public void include(ServletRequest request,ServletResponse response)throws ServletException,java.io.IOException:Includes the content of a resource (servlet, JSP page, or HTML file) in the response.

Rohit Sharma 11-27-2014 04:24 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement