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 are Servlets?
What are the phases of the servlet life cycle?
What is servlet in web technology?
What are the common methods that are included in the http servlet class?
What is cookie? Why is cookie used?
Which interface must be implemented by all servlets?
What is servlet container. how it works?
What is webservlet?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
Why do we have servlet listeners?
What are the uses of servlet
Write a program to show the functionality of doget and dopost method?
What is servlet configuration?
Why doesn’t a servlet include main()? How does it work?
What is the advantage of Servlets when compared with other server side technologies?