Difference between Include, Forward and sendRedirect in
Servlet?

Answer Posted / saikiran

main difference between include forwared is
pathelements:
-------------
pathelements are not available to the sended servlet
that are to be available to the other servlet in the c
ase of forward.
incase of include both pathelements are available to
the both servlets.
Response Generation:
--------------------
in the response generation forward forwarded servlet
message will be printed
eg:
two servlets ser1 and ser2
ser1 forwarded to ser2 then ser2 messages will be
displayed not by ser1
in case of include both of them

Is This Answer Correct ?    8 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the lifecycle for executing a jsp page.

596


What are session variable in servlets?

568


How do you communicate in between Applets and Servlets?

597


What's the architecture of a servlet package?

558


Tell us something about servletcontext interface.

628






What exactly is a servlet?

547


When a servlet accepts a call from a client, it receives two objects. What are they?

771


What are the kinds of http requests?

611


Describe the phases of servlet lifecycle?

634


Explain the difference between a web server and a web container?

519


What is servlet and its use?

629


Whether thread can be used in servlets?

731


What do you mean by the servlet chaining?

549


How can we achieve transport layer security for our web application?

573


What is context in servlet?

540