What is forward() and include() of servlets
RequestDispatcher interface?
Answer Posted / katamraju
Forward():By using forward() method of RequestDispatcher ,ew
can forward a request to a another resource(i.e
servlets,jsp,html....),at finally we can see only called
resource output(i.e second resource output )
For exm. we have two servlets,(servlet1 and servlet2) we are
forwarding request from servlet1 to servlet2, in this case
we can see only servlet2 output.
include():By using include() method of RequestDispatcher we
can forward a request from servlet12 to servlet2 ,in this
case we can see both outputs(i.e servlet1 and servlet2).
in both case single request and single response.
Is This Answer Correct ? | 41 Yes | 9 No |
Post New Answer View All Answers
List out the difference between ServletConfig and ServletContext?
Is servlet a server side scripting language?
How will you pass values from HTML page to the servlet?
Explain the methods of request dispatcher in servlet?
What is a cookie What is the difference between session and cookie
Explain the working of service() method of a servlet.
Write a hello world program using servlets.
What is meant by a web application
Which interface must be implemented by all servlets?
What are the important functions of filters?
What are the different ways we can maintain state between requests?
Explain web application directory arrangement?
What is java servlet?
Explain session tracking and its importance?
Why is Servlet so popular?