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
Which interface must be implemented by all servlets?
When jsessionid is created?
What's the servlet interface?
What is http servlet? Explain with the help of an example.
How can the referrer and the target urls be used in servlet?
What is the difference between Server and Container?
What is war file?
Describe some assignments that are executed by servlet container?
What is the life-cycle of servlets?
Describe servlet?
What is dispatcher servlet?
What are the uses of servlet
What is preinitialization of a servlet?
What are the advantages of cookies?
How do you create a cookie using servlet?