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

Why do we have servlet wrapper classes?

1112


How can we include static files in the jsp page?

1114


Explain session tracking and its importance?

1053


What are the advantages of servlets over traditional cgi?

1145


Why are http servlets used in programming?

1055


How do we share data using 'getservletcontext ()?

1092


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2834


Can you refresh servlet in client and server-side automatically?

1130


What are the disadvantages of storing session state in cookies?

1189


How can we refresh automatically when new data has entered the database?

1160


What is the difference between genericservlet and httpservlet

1146


What are some disadvantages of storing session state in cookies?

1073


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

1328


What is URL Encoding?

1274


Why the concept of single thread model interface is used?

1048