What is forward() and include() of servlets
RequestDispatcher interface?

Answer Posted / ravikiran

forward will make the flow into a different page,where as
include mechanism will include the page to the current
response and continues the flow.
Note:the forward and include should be called before the
response is committed for example before the call to flush()
or flushBuffer() or the write method in the response stream

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you get the ip address of the client in servlet?

559


How does java thread pool work?

556


What's the advantages using servlets than using cgi?

560


What are the phases of a servlet life cycle?

626


What are the key methods that are involved in processing of http servlets?

635






What is session tracking?

704


How httpservlet is different from the genericservlet?

574


What is the difference between portlet and servlet?

521


Why jsp is better than servlet?

541


What exception should be thrown when servlet is not properly initialized?

561


How can we include static files in the jsp page?

621


What do you mean by url pattern in servlet?

636


What is the difference between encodeRedirectUrl and encodeURL?

615


What are all the advantages of servlet over cgi?

612


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

585