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 / vinod muda

In First Servlet i.e Test

String name = "Vinod";
request.setAttribute("name",name);
RequestDispatcher dis = request.getRequestDispatcher
("Test2");
dis.forward(request, response);
---------------------------------------
Now in Second Servlet i.e Test2

String name = (String) request.getAttribute("name");

Is This Answer Correct ?    29 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain url encoding in servlet?

996


How does java thread pool work?

1020


Explain servlet.

995


Write a hello world program using servlets.

1013


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

1034


Which protocol will be used by browser and servlet to communicate

990


Whether we can get deadlock situation in servlets?

1010


How do you find out what client machine is making a request to your servlet

1006


What do you mean by filter in servlet?

950


What is the difference between Servlets and Applets?

967


What is cgi?

948


Differentiate between the print writer and servlet output stream?

954


How the servlet is loaded?

1009


What is meant by servlet? What are the parameters of the service method?

964


what is multiple server?

2257