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 is servlet container?
What are the differences between forward() method and sendredirect() methods?
How can we upload the file to the server using servlet?
What do you mean by a filter and how does it work?
What is the life cycle of a servlet?
What is meant by cookies?
What is servlet in tomcat?
request parameter how to find whether a parameter exists in the request object?
Why doesn’t a servlet include main()? How does it work?
What methodology can be followed to store more number of objects in a remote server?
Why do we need a constructor in a servlet if we use the init method?
What is the use of java servlet api?
Elucidate servlet attributes and its scope?
Why jsp is better than servlet?
Why is Servlet so popular?