Difference between Include, Forward and sendRedirect in
Servlet?
Answer Posted / franklin
Include:It helps us to include the contents of some other
file in a JSP
jsp:include-it includes the contents during the run time
forward:will send the same request to the new server.Client
will not know that he s redirected to the new page as
forwarding will take place at the server end.
sendRedirect:will not send the same request to the
server.Client will know that he s redirected to the other
site.
| Is This Answer Correct ? | 27 Yes | 17 No |
Post New Answer View All Answers
Which protocol will be used by browser and servlet to communicate
What are the exceptions thrown by servlets? Why?
Who is responsible for writing a constructor?
What are sessions in servlets?
What is servlet in web technology?
What is the importance of init() method in Servlet ?
Why are servlets used?
Why doesn’t a servlet include main()? How does it work?
What is session tracking?
What are the differences between forward() method and sendredirect() methods?
What is servlet initializer?
Can servlet have a constructor ?
What are some advantages of storing session state in cookies?
What is the use of httpservletrequestwrapper?
What is servlet container. how it works?