Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is Servlet API used for connecting database?

1049


Describe in brief RequestDespatcher?

1073


How can we achieve transport layer security for our web application?

969


Difference between doget and dopost?

1111


What is the use of servletconfig interface?

994


If my browser does not support cookie, and my server sends a cookie instance what will happen?

1038


Servlet is pure java object or not?

1141


When servlet object is created?

1076


Can we use threads in Servlets?

1081


What is the importance of init() method in Servlet ?

1039


What if you need to span your transaction across multiple servlet invocations?

1038


How servlet is created?

1115


Differentiate between the print writer and servlet output stream?

955


What is a servlet engine?

971


What’s the difference between genericservlet and httpservlet?

1023