What is the use of RequestDispatcher in servlet?
Answer Posted / naresh
consider there are two servlet,such as "aservlet"
and "bservlet"
suppose a client requests "aservlet" ,which
inturn "aservlet" depends on "bservlet"
we must redirect the request from "aservlet" to "bservlet
this is done by two steps :-
1.RequestDispatcher disp= getServletContext
().getRequestDispatcher("/url of bservlet");
2.
2.1.- rd.forward(req,res);
2.2.-rd.include(req,res);
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
How httpservlet is different from the genericservlet?
What is the servlet?
How is a servlet implemented in code?
Describe in brief RequestDespatcher?
Explain the role of dispatcherservlet and contextloaderlistener.
What is the default http method in the servlet?
How do you communicate in between Applets and Servlets?
What is the inter-servlet communication?
What is servlet container?
Explain the difference between jsp and servlet?
What are the different ways we can maintain state between requests?
What is the capacity the doget can send to the server?
Write the code to get the server information in servlet.
What are the new features added to servlet 2.5?
A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?