What is the use of RequestDispatcher in servlet?
Answer Posted / tirupathi rao
RequestDispatcher is used to connect to another webresource
with in the same context.
RequestDispatcher
rd=ServletContext.getRequestDispatcher("url of resource");
rd.forward(req,res);----used to forward to another resource.
rd.include(req,res);----used to include other resource.
| Is This Answer Correct ? | 132 Yes | 15 No |
Post New Answer View All Answers
Whether thread can be used in servlets?
What exception should be thrown when servlet is not properly initialized?
Why doesn’t a servlet include main()? How does it work?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
Is that servlet is pure java object or not?
What is meant by a web application
Explain the role of dispatcherservlet and contextloaderlistener.
How can we upload the file to the server using servlet?
How does java thread pool work?
What is load-on-startup in servlet?
What are the differences between the servletconfig interface and the servletcontext interface?
What is servlet in simple terms?
Explain request dispatcher and its methods.
Why are http servlets used in programming?