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
How do you deal property files in servlet?
What is the use of java servlet api?
What is ServletConfig object?
Differentiate between the print writer and servlet output stream?
How we can call a jsp from the servlet?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
How to create war file?
What are the types of servlets? Explain
Explain the difference between generic servlet and http servlet?
Can you use javascript in servlets?
What's the difference between authentication and authorization?
What are advantages of servlets over cgi?
Explain the war file?
How many objects of a servlet is created?
How do you get the ip address of the client in servlet?