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
Explain request dispatcher and its methods.
Define context initialization parameters.
Can filter be used as request or response?
What is context in servlet?
What is the difference in between the httpservlet and generic servlet?
What is the use of welcome-file-list?
What do you mean by chaining in servlet?
How can we perform any action at the time of deploying the project?
What is the importance of init() method in Servlet ?
What are the uses of servlets?
Is servlet a controller?
What are the steps involved in placing a servlet within a package?
What is servlet instance?
What is a servlet context?
What methodology can be followed to store more number of objects in a remote server?