The method forward(request,response) will

Options
- return back to the same method from where the forward was invoked
- not return back to the same method from where the forward was invoked and the web pages navigation continues
- Both A and B are correct
- None of the above


CORRECT ANSWER : return back to the same method from where the forward was invoked

Discussion Board
forward()

RequestDispatcher Interface - consists of two methods that are as follows:
1) forward(ServletRequest request, ServletResponse response)- this forward method is used to forward the request to another resource on the same server and the server where the request needs to be sent.
2) include(ServletRequest request, ServletResponse response)- it works like a server-side and includes the response from the given resource like Servlet, JSP page, HTML page within the caller response.

Forward request provides a way to forward to resources available within the server from where the call is made. This transfer of control is done by the container internally where the browser / client is not involved.

Rohit Sharma 11-29-2014 10:11 AM

Forward request

Forward request is used to forward to resources available within the server from where the call is made. This transfer of control is done by the container internally and browser / client is not involved. It return back to the same method from where the forward was invoked

Career 09-14-2014 01:17 AM

correction in ans

in forward()
not return back to the same method from where the forward was invoked and the web pages navigation continues

but in include()
return back to the same method from where the forward was invoked

abhi 09-13-2014 03:36 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