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
How to get the current httpsession object?
What do you mean by request dispatcher in servlet? Also explain its methods.
How do I support both get and post from the same servlet?
What are the life cycle methods of a servlet?
How can you use a servlet to generate a plain text instead of html?
What is setattribute in servlet?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
What is called a session?
List out difference between a JavaBean from a Servlet?
Which exception is thrown if the servlet is not initialized properly?
What do you mean by httpservlet and how it is different from the genericservlet?
What is http servlet? Explain with the help of an example.
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
Explain url encoding in servlet?
What is servlet in tomcat?