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

What is called Scriptlet?

564


Why is init() method is used in servlets?

558


What are the advantages of Servlet over CGI?

670


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

647


What do you mean by url pattern in servlet?

631






Explain mvc pattern.

594


How the typical servlet code look like ?

638


When Servlet is unloaded?

629


What are the drawbacks of cgi?

572


Which interface should be implemented by all servlets?

702


How to get the current httpsession object?

655


What is the difference between CGI and Servlet?

590


What are the different mode that servlets can be used?

557


Write a servlet to upload file on server.

600


What is difference between the HTTP Servlet and Generic Servlet? Explain about their methods and parameters?

617