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 to find whether a parameter exists in the request object?
What is SingleThreadModel interface?
Write all the phases defined in servlet life cycle?
What is the use of java servlet api?
What are different Authentication options available in Servlets.
What are its drawbacks of cgi?
What do you mean by cgi and what are its drawbacks?
How do we translate jsp?
how many jsp scripting elements are there and what are those?
How do you invoke a servelt?
What is the use of servlet wrapper classes?
What are the functions of an intercepting filter?
What do you understand by mime type?
What are the advantages of Servlet over CGI?
What’s the difference between genericservlet and httpservlet?