How many ways are available to ger RequestDispatcher object?
Answer Posted / rice
There are two 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);
Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
What is difference between GenericServlet and HttpServlet?
How can an existing session be invalidated?
How is a servlet implemented in code?
How to get the current httpsession object?
What is the use of servletconfig interface?
Explain the architechure of a servlet?
What do you mean by default initialization in java servlet?
Why session tracking is needed?
What are the different session tracking techniques?
Given the request path below, which are context path, servlet path and path info?
What are the key methods that are involved in processing of http servlets?
How httpservlet is different from the genericservlet?
How can a servlet be used to generate plain text instead of html?
Why filter is used in servlet?
What is servlet instance?