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

What do you understand by mime type?

984


What is servlet and its advantages?

1046


What are the types of an http request?

1151


What is difference between server and servlet?

1089


Whether we can get deadlock situation in servlets?

1067


How do we translate jsp?

1050


What are the disadvantages of storing session state in cookies?

1146


How do you design microservices?

1074


How do I know if java is running on linux?

1120


What is the use of httpservletresponsewrapper?

965


What is the type of method for sending request from http server?

1102


What is webservlet?

991


Explain the difference between jsp and servlet?

1067


Define context initialization parameters.

1031


What are the important functions of filters?

1139