Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Which are servlet lifecycle methods ?

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2014/01/20
Wasif Iqbal Shaikh
par Wasif Iqbal Shaikh , IT Consultant , Reach Management Services - Client Emirates NBD

1. init() - called once when the servlet is first created, so its used for one time initializations like db init.

2. service() - this is the method which performs the actual task, internally calls doGet(), doPost(), etc. depending on the request method.

3. destory() - called at the end of the lifecycle of the servlet, to perform tasks like closing db connections.

More Questions Like This