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...

How do you pass the data from one servlet to another
servlet?

Answer Posted / harish

Using Request Dispatcher, you can send the values and
forward to another page.
ServletContext.getRequestDispatcher();
reqDispatcher.forward(req,res)
Forwards a request from a servlet to another resource
(servlet, JSP file, or HTML file) on the server.
reqDispatcher.include(req,res)
Includes the content of a resource (servlet, JSP page, HTML
file) in the response.

Is This Answer Correct ?    80 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is an application exception handling is done using a servlet?

1016


What are the annotations used in servlet 3?

1031


What do you mean by request dispatcher in servlet? Also explain its methods.

1145


what is multiple server?

2302


What is servlet initializer?

971


What is servlet in tomcat?

1051


What is the difference between servlet and filter?

949


how the HTML data stored in web server?

2630


What is the difference between the include() and forward() methods?

1079


What is the workflow of a servlet?

1173


Why servlet is used as controller ? Not JSP? I want complete explation?

1127


List out the difference between ServletConfig and ServletContext?

1039


What is url encoding and url decoding

1148


Explain url encoding?

987


What is the directory structure of web application?

980