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
What are advantages of servlets over cgi?
Can you create a deadlock condition on a servlet?
What is servlet? Explain
What is URL Encoding?
Why servlet is faster than jsp?
Name the packages that work with servlet?
Why jsp is better than servlet?
Explain the working of service() method of a servlet.
Who is responsible to create the object of servlet?
Which httpsession object is used to view and manipulate information about a session?
Can you send an authentication error from a servlet?
What are the differences between the servletconfig interface and the servletcontext interface?
Explain the custom jsp tags and the beans.
How do you load an image in a Servlet?
What do you mean by scope object and what are its types?