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 servlet life cycle?

Answer Posted / anu

There are 3 methods in servlet life cycle:init(),service
(),destroy().
whenever servlets loads,init() method is invoked.init
()invokes only once in whole life cycle.then service()
method is invoked which handles all the Http requests and
correspondingly generate Http response.Finally service()
method is invoked for unloading the servlet.this method is
also invoked only once.

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why doesn’t a servlet include main()? How does it work?

1163


How can you use a servlet to generate a plain text instead of html?

1135


What is httpservlet and how it is different from genericservlet?

1104


Which protocol will be used by browser and servlet to communicate

1059


Explain jsessionid?

1043


Name the different ways of session tracking.

1030


Differentiate between get and post?

1164


What is the difference between jsp and servlet life cycle?

1225


What is Servlets and explain the advantages of Servlet life cycle?

1109


What is servlet and its types?

1058


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

1060


Where do you define dispatcherservlet?

1052


Explain the difference between generic servlet and http servlet?

1000


What is the structure of the http response

1179


Is that servlet is pure java object or not?

1122