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
Which method is called when reference variable is passed in system.net?
If a servlet is not properly initialized, what exception may be thrown?
What do you mean by annotations in servlet?
Explain session tracking and its importance?
Why is init() method is used in servlets?
What do you mean by a filter and how does it work?
What is the purpose of dispatcherservlet properties?
Why servlet is faster than jsp?
How do we call one servlet from another servlet?
How forward () method is different from send redirect () method?
How does java thread pool work?
What are the differences between forward() method and sendredirect() methods?
hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code
What is servlet invoker?
What is the need of servlet filters?