How many ways are available to ger RequestDispatcher object?
Answer Posted / seshendra
There are three ways to get RequestDispatcher object in the
servlet.
1. calling the getRequestDispatcher(String path) method on
ServletRequest.
RequestDispatcher rd=request.getRequestDispatcher(String path);
2. By getRequRequestDispatcher(String path) method on
ServletContext.
RequestDispatcher rd=context.getRequestDispatcher(String path);
3.by calling getNamedDispatcher(servlet logical name)on
ServletContext object
RequestDispatcher rd=context.getNamedDispatcher(servlet
logical name)
Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
How can you use a servlet to generate a plain text instead of html?
Explain servlet.
How to upload a file to the server using servlet?
What is the need of session tracking in web application?
What is a servlet?
When Servlet is unloaded?
Explain mvc pattern.
Explain the custom jsp tags and the beans.
What is the process for chaining servlet?
Explain in brief the directory structure of a web application?
When servlet object is created?
What are the objects involved when a servlet receives a call from client?
What is a servlet engine?
Explain how to improve Servlet Performance?
How do you run a servlet?