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

How to find whether a parameter exists in the request object?

1116


What is SingleThreadModel interface?

1154


Write all the phases defined in servlet life cycle?

1166


What is the use of java servlet api?

1041


What are different Authentication options available in Servlets.

1077


What are its drawbacks of cgi?

1132


What do you mean by cgi and what are its drawbacks?

989


How do we translate jsp?

1061


how many jsp scripting elements are there and what are those?

1022


How do you invoke a servelt?

1133


What is the use of servlet wrapper classes?

1189


What are the functions of an intercepting filter?

958


What do you understand by mime type?

999


What are the advantages of Servlet over CGI?

1154


What’s the difference between genericservlet and httpservlet?

1124