What is the use of RequestDispatcher in servlet?
Answer Posted / tirupathi rao
RequestDispatcher is used to connect to another webresource
with in the same context.
RequestDispatcher
rd=ServletContext.getRequestDispatcher("url of resource");
rd.forward(req,res);----used to forward to another resource.
rd.include(req,res);----used to include other resource.
| Is This Answer Correct ? | 132 Yes | 15 No |
Post New Answer View All Answers
How a servlet is unloaded?
Write a simple servlet program to print the contents of html.
Why filter is used in servlet?
What mechanisms are used by a Servlet Container to maintain session information?
What is servlet lazy loading?
What’s the difference between forward() and sendredirect() methods?
What are the advantages of cookies?
Is it good idea to create servlet constructor?
Which java framework is most popular?
What are the differences between forward() method and sendredirect() methods?
What is the web server used for running the Servlets?
What is the difference between servlet and filter?
What is the difference between context parameter and context attribute?
Servlet is pure java object or not?
How can I send user authentication information while making URL Connection?