What is the use of RequestDispatcher in servlet?
Answer Posted / bhudeep
RequestDispatcher is used to dispatch the request.that means
one resource take the ownership from another
resources (Servlets,jsps,htmls) available in the web
applicaions for handle the request.
we can get RequestDispatcher in two ways
1. servletContext.getRequestDispatcher("/absolute 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 ? | 21 Yes | 12 No |
Post New Answer View All Answers
What is called Session Tracking?
What is api in servlet?
Can filter be used as request or response?
Define context initialization parameters.
How many objects of a servlet is created?
What are Servlets?
Explain servlet.
What is a servlet context object?
Describe servlet?
Difference between doget and dopost?
What is the life cycle of a servlet?
What is a generic servlet?
How are filters?
Explain load on start-up and its importance?
What is http servlet?