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’s the difference between sendredirect and forward methods
What do you mean by web applications?
Why do you use session tracking in httpservlet?
How do you run a servlet?
If a servlet is not properly initialized, what exception may be thrown?
What are the steps involved in placing a servlet within a package?
How to read request headers from servlets?
What are the advantages of Servlet over CGI?
How will two or three servlets interact or communicate with each other?
How can you create a session in servlet?
What is generic servlet class?
What are the different types of servlets?
What is difference between server and servlet?
What if you need to span your transaction across multiple servlet invocations?
What is the difference between Difference between doGet() and doPost()?