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
Which protocol will be used by browser and servlet to communicate
What is meant by servlet? What are the parameters of the service method?
How to get the path of servlet in the server?
What is context in servlet?
Elucidate servlet attributes and its scope?
How do servlets work?
What is Servlet API used for connecting database?
What is cgi and what are its drawbacks?
Which is the methods of generated servlet?
What are the supporting protocol by HttpServlet ?
What is meant by a web application
What are the advantages of servlets over traditional cgi?
What are the ways to handle multi-threading in servlets?
What is called servlet mapping?
Explain request dispatcher and its methods.