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 differences between servlet context vs servlet config?
What do you mean by filter in servlet?
Why are servlets used?
What is a servlet-to-servlet communcation?
What is lazy loading and what is Generic Servlet Class?
How do you get the ip address of the client in servlet?
What is called Scriptlet?
How will you pass values from HTML page to the servlet?
Explain the servlet filter.
What are the life cycle methods of the servlet?
What is the servletconfig object?
How are filters?
Which http method is said to be non-idempotent and idempotent?
What are the two important api's in for servlets?
Who is responsible for writing a constructor?