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 do you mean by httpservlet?
Can you send an authentication error from a servlet?
What do you mean by annotations in servlet?
What are the jobs performed by servlets?
What is java servlet?
What exactly is a servlet?
Is servlet a framework?
Can we get PrintWriter and ServletOutputStream both in a servlet?
What are the two important api's in for servlets?
What is servlet instance?
What do you mean by url pattern in servlet?
What is httpservlet class?
What is the main purpose of java servlets?
What do you mean by request dispatcher in servlet? Also explain its methods.
How will you pass values from HTML page to the servlet?