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
Is servlet a controller?
What is servlet name in web xml?
How the servlet is loaded?
What is the servletconfig object?
How can the session in servlet can be destroyed?
What do you mean by httpservlet?
What is dispatcher servlet?
What is the need of servlet filters?
How can the session in servlet be destroyed?
What are the different methods of session management in servlets?
Can you refresh servlet in client and server-side automatically?
Describe servlet?
What are the differences between the servletconfig interface and the servletcontext interface?
Can you call a jsp from the servlet?
How to get the IP address of client in servlet?