servlet init & destroy

All,Please give me Ans with brief explanation. because i am newly web developer.If i open two browser on same computer and close one by one then how many times init() and destroy() method will call.Regards,Dhirendra rawal
[256 byte] By [dhiru123a] at [2007-11-27 1:49:58]
# 1

this is container's job to call init() and destroy() method. it does nt affect by user's opening browser and closing it back.

if it is first request for this servlet then container will create the instance and at the sametime it will call the init() method..case of your two browser it will create two threds and it calls the service() method ans serve you.

same way destroy() method also called once container ger re-strated or closed.

dipak66a at 2007-7-12 1:15:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...