What is the use of RequestDispatcher in servlet?

Answer Posted / suresh g

RequestDispatcher:

RequestDispatcher class is mainly used to 'pass on'
the current request to another program (servlet) and
therefore allows 'chaining' of the programs. A
RequestDispatcher primarily contains two methods
include() and forward(). include() method includes
the response of another program while forward()
method forwards the request of the current program
to another one.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the process to implement doget and dopost methods?

759


What are the various ways of session supervision in servlets?

771


How a servlet is unloaded?

841


How do we share data using 'getservletcontext ()?

790


What do you mean by cgi and what are its drawbacks?

755


What’s the use of the servlet wrapper classes??

870


What is getservletcontext?

772


Explain web application directory arrangement?

817


What is servlet instance?

797


What is cookies in servlet with example?

747


How to commuincate between an applet and a servlet?

810


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

812


What is the disadvantage of cookies?

803


Is servlet a server side scripting language?

850


Write all the phases defined in servlet life cycle?

789