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

When the methods init() and Distroy() will be called?

Answer Posted / abhijitbaji

both init() and destroy() are called only once.

init() at the begining when servlet object is cerated.
destroy() when the servlet object is removed from server(at
shoutdown).

service() is called each time when request comes to servlet.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who is responsible for writing a constructor?

1202


What is the difference between CGI and Servlet?

1009


How can you start a jta transaction from a servlet deployed on jboss?

1102


Explain how does JSP handle run-time exceptions?

1035


What is string tokenizer?

1028


How do servlets work?

975


What is getservletcontext?

986


How can a servlet be used to generate plain text instead of html?

902


How do we call one servlet from another servlet?

980


What is the disadvantage of cookies?

949


Is servlet thread safe?

932


Where do you define dispatcherservlet?

987


What is the use of java servlet api?

975


How do you configure a centralized error handler in servlets?

1031


What is servlet attributes and their scope?

996