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
Write a command to get actual path of a servlet to the server?
Servlet is pure java object or not?
What do you mean by httpservlet and how it is different from the genericservlet?
Which are the different ways you can communicate between servlets?
What are the phases of servlet life cycle?
What do you mean by servlet context?
What is servlet and how it works?
Difference between get and post in java servlets?
Can we refresh servlet in client and server side automatically?
How the typical servlet code look like ?
How do I know if java is running on linux?
What is the
What is the major difference between servlet and applet?
Which httpsession object is used to view and manipulate information about a session?
What is MIME Type?