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 is the use of httpservletrequestwrapper and httpservletresponsewrapper?
What is Servlet API used for connecting database?
Define context initialization parameters.
How the servlet is loaded?
Explain the difference between a web server and a web container?
If servlet receives multiple requests, how many objects will it create?
What is the use of httpservletresponsewrapper?
What is a servlet-to-servlet communcation?
what do you understand by url rewriting?
In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify
What is the servlet?
What are different methods of session management in servlets?
What is servlet instance?
What do you mean by httpservlet?
Explain the features are in servlet 3?