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
What are the features added in Servlet 2.5?
What's the use of servletcontext?
What are the kinds of http requests?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
What do you mean by web applications?
Define the life cycle of a servlets.
How are filters?
What is httpservlet and how it is different from genericservlet?
What is called servlet container?
What methodology can be followed to store more number of objects in a remote server?
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What are life cycle methods of a servlet?
What are the differences between servlet context vs servlet config?
How to get the server information in a servlet?