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
What is cookie? Why is cookie used?
Why servlet is faster than jsp?
What are the steps that are required to handle the multi-threading?
What is the use of request dispatcher interface?
What are the key methods that are involved in processing of http servlets?
What is the importance of init() method in Servlet ?
What is the difference in between the httpservlet and generic servlet?
Explain load on start-up and its importance?
What are the steps involved in placing a servlet within a package?
What does the term localization refer to?
Is java servlet still used?
What are the important functions of filters?
What do you mean by session tracking and also explain its techniques?
What are different ways for servlet authentication?
What is the purpose of inter-servlet communication?