What is the use of RequestDispatcher in servlet?
Answer Posted / sekharbabu
RequestDispatcher is used to move/call the another
resources (Servlets,jsps,htmls) available in the web
applicaions
we can get RequestDispatcher in two ways
1. servletContext.getRequestDispatcher("/path");
2. servletRequet.getRequestDispatcher("relativepath");
now we can move to another resources with the following
methods available in RequestDispatcher
include(req,res);
forward(req,res);
| Is This Answer Correct ? | 25 Yes | 17 No |
Post New Answer View All Answers
What are the two important api's in for servlets?
What is the purpose of dispatcherservlet properties?
What are the life-cycle methods for a servlet?
What is cookie in servlet?
Define context initialization parameters.
What is the difference between get and post methods?
What is the inter-servlet communication?
What are the uses of servlets?
What is Client-Server Computing?
How can a servlet be used to generate plain text instead of html?
How is a servlet implemented in code?
What do you mean by request dispatcher in servlet?
What is the default http method in the servlet?
What do you mean by servlet?
Why is http protocol called as a stateless protocol?