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 are the types of an http request?
Is tomcat a servlet container?
What is servlet used for?
What's the difference between servlets and applets?
Write the code to get the server information in servlet.
What is the difference between Difference between doGet() and doPost()?
Define the servlet mapping.
If a servlet is not properly initialized, what exception may be thrown?
Tell us something about servletconfig interface.
What is the purpose of requestdispatcher interface?
Why the concept of single thread model interface is used?
Write a program to show the functionality of servlets.
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?
How do we call one servlet from another servlet?
What are the servlet events?