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 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the use of servletcontext?

692


What are the type of protocols used in httpservlet?

628


How to get the actual path of servlet in server?

747


What are Servlets?

610


The code in a finally clause will never fail to execute, right?

613






What is new in ServletRequest interface ? (Servlet 2.4)

588


Can you use javascript in servlets?

612


What is the need of session tracking in web application?

593


What are all the protocols supported by httpservlet?

660


What is difference between PrintWriter and ServletOutputStream?

787


Difference between doget and dopost?

692


what is multiple server?

1771


What is the difference between using getSession(true) and getSession(false) methods?

578


What is the procedure of invoking different servlet in a different application?

573


What is servlet used for?

710