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 servlet configuration?

775


What are the jobs performed by servlets?

786


What's the difference between authentication and authorization?

813


What is the difference between a generic servlet and http servlet?

736


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

763


How we can get ip address of client in servlet?

750


What is servlet initializer?

712


what is servlet chaining?

838


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

806


What is the difference between 2 types of servlets?

877


How httpservlet is different from the genericservlet?

807


What is the requirement of servlet config and servlet context implemented and how are they implemented?

768


What are the functions of an intercepting filter?

722


What is servlet in simple terms?

793


What is the process for chaining servlet?

801