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

What is servlet attributes and their scope?

782


What is the difference between Servlets and Applets?

753


Explain mvc pattern.

762


What is a java servlet?

762


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

761


What is the inter-servlet communication?

923


Who is responsible to create the object of servlet?

913


What are the different methods involved in the process of session management in servlets?

898


What do you mean by servlet context?

797


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

769


Which is the methods of generated servlet?

885


Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

986


what do you understand by url rewriting?

706


What is a deployment descriptor?

837


How the JSP file will be executed on the Server side?

870