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
How can we create deadlock situation in servlet?
What's the advantages using servlets than using cgi?
how many jsp scripting elements are there and what are those?
What are the mechanisms used by a servlet container for maintaining session information?
What do you mean by cgi in servlet?
What’s the difference between forward() and sendredirect() methods?
How we can get ip address of client in servlet?
What is war file?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Whether we can get deadlock situation in servlets?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
What is servletconfig?
Write a program to show the functionality of servlets.
What is servlet and its life cycle?
How httpservlet is different from the genericservlet?