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


Please Help Members By Posting Answers For Below Questions

What are the important functions of filters?

601


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

557


Explain the architechure of a servlet?

605


What is servlet and list its types?

545


Why is httpservlet declared abstract?

582






Which application server is best for java?

560


What are Servlets?

599


What are the different session tracking techniques?

684


What do you mean by chaining in servlet?

576


What is the difference between the http servlet and generic servlet?

604


Does servlet have main method?

691


Why is Servlet so popular?

618


What do you mean by default initialization in java servlet?

606


What's the architecture of a servlet package?

558


What is meant by session? Tell me something about httpsession class?

605