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 types of protocols supported by httpservlet ?

914


How printwriter is different from servletoutputstream?

764


What is the use of httpservletrequestwrapper?

771


What is the difference between encodeRedirectUrl and encodeURL?

820


What are the different methods of session management in servlets?

724


What is meant by servlet? What are the parameters of the service method?

788


What are the important functions of filters?

794


Can you use javascript in servlets?

795


Difference between doget and dopost?

898


What do you mean by chaining in servlet?

774


What are the steps that are required to handle the multi-threading?

835


Describe servlet?

759


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

819


What is the functionality of actionservlet and requestprocessor?

785


What is the purpose of inter-servlet communication?

786