Answer Posted / avinah kapoor
import javax.servlet.*;
import javax.servlet.http.*;
public class RequestDispatcherDemo extends HttpServlet
{
public void doGet(HttpServletRequest
req,HttpServletResponse res) throws ServletException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
RequestDespatcher rd=req.getRequestDispacher("welcome");
rd.forward(req,res);//it forwart the response to
welcome servlet page but cant take resource calling page.
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the process to implement doget and dopost methods?
What is war file?
Where do you define dispatcherservlet?
What's the servlet interface?
Why servlet is mostly used?
What is servlet name in web xml?
What is context in servlet?
What is the difference between 2 types of servlets?
What do you mean by session tracking?
Can you use javascript in servlets?
How to get the server information in a servlet?
What are the functions of the servlet container?
Can you send an authentication error from a servlet?
What are the uses of servlets?
What is the use of httpservletresponsewrapper?