Difference between Include, Forward and sendRedirect in
Servlet?

Answer Posted / abilash

include: will include another file in our current file

forward: will forward the current request to the forwarding page

sendRediect: will call the next page but it won't send the
same request to the new page but forward will send the same
request to the new page

Is This Answer Correct ?    96 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the servlet context.

797


Write a program to show the functionality of doget and dopost method?

873


Why servlet is used as controller ? Not JSP? I want complete explation?

870


What are the two important api's in for servlets?

788


What is the difference between servlet and filter?

706


Define declaration.

796


What is the advantage of Servlets when compared with other server side technologies?

2061


What is the need of servlet filters?

721


What do you mean by request dispatcher in servlet? Also explain its methods.

821


What is difference between cookies and httpsession?

757


What is the difference between the include() and forward() methods?

781


What is httpservlet and how it is different from genericservlet?

789


What’s the difference between genericservlet and httpservlet?

721


What are life cycle methods of a servlet?

766


How will you pass values from HTML page to the servlet?

752