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

What is a web container and what is its responsibility?

937


Describe in brief RequestDespatcher?

1086


Whether we can get deadlock situation in servlets?

1024


Difference between get and post in java servlets?

996


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

1060


Are Servlets Thread Safe? How to achieve thread safety in servlets?

930


Why is httpservlet declared abstract?

1077


What is the use of httpservletrequestwrapper?

1055


What are the common methods that are included in the http servlet class?

1010


How many objects of a servlet is created?

1233


What is servlet name in web xml?

959


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

1001


What is the difference between 2 types of servlets?

1097


Write a simple servlet program to print the contents of html.

1004


What is the procedure of invoking different servlet in a different application?

977