Answer Posted / sudhakar
import javax.servlet.*;
import javax.servlet.http.*;
public class TestDispatcher extends HttpServlet throws
IOException, ServletException {
public void doGet(HttpServletRequest request,
HttpServletResponse response) {
RequestDispatcher dispatcher =
request.getRequestDispatcher("/template.jsp");
dispatcher.forward(request, response);
}
}
| Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
what is servlet chaining?
What do you mean by web applications? Explain web application directory arrangement?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
What are the mechanisms used by a servlet container for maintaining session information?
How to make sure a servlet is loaded at the application startup?
What is the major difference between servlet and applet?
What is difference between cookies and httpsession?
Who is responsible for writing a constructor?
What is the difference between Server and Container?
Write the code to get the server information in servlet.
What is Servlet API used for connecting database?
What is a web container and what is its responsibility?
Difference between get and post in java servlets?
What are different ways for authentication of servlet?
Is tomcat a servlet container?