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?

Answers were Sorted based on User's Feedback



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

Answer / tulasi vani

The servlet life cycle included init() and destroy()(Small
d).

init() is called at the beginning of the servlet,it
performs certain one time activities which are required
during the lifetime of the servlet.It may be some
initialisation of variables or a database connection.

destroy() is called to destroy the servlet.Various
resources which are held by the servlet will be
released,database connections which were opened will be
closed.Later the servlet is destroyed.

Is This Answer Correct ?    4 Yes 0 No

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

Answer / 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

More Servlets Interview Questions

when the webcontainer creates ServeletConfig,ServletContext objects? befoure creating the Servlet object or not?

4 Answers   TCS,


What is the difference between get and post methods?

0 Answers  


Is tomcat a servlet container?

0 Answers  


What is the difference between genericservlet and httpservlet

0 Answers  


what are the CGI Programs?

5 Answers  


how the jsp page can be regenerated?

2 Answers   HCL,


Explain url encoding in servlet?

0 Answers  


What if we pass negative value in load-on-startup?

0 Answers  


what is session tracking?what are types of session tracking ?and when to cookies,when to use sessionmanagement,whent use url rewriting technique,plz explain briefly?

6 Answers   Satyam, TCS,


What is servlet and its advantages?

0 Answers  


How to rectify errors in java servlet while compilation?

0 Answers  


what is the difference b/w DispatchAction and LookUpDispatchAction?

1 Answers   Deloitte, iGate, Tech Mahindra,


Categories