Originally posted by Akhilesh Yadav:
please answer the Following Questwions
1) if I directly close the browser in which servlet in running at that time will my Destroy Method willb called ?
No.Its a callback method and part of the servlet lifecycle.When you bring down the server , the container will call the destroy method.Nothing to do with browser closing.
Originally posted by Akhilesh Yadav:
2) if my server crashes willtht time Destroy method will be called ?
During server crash , the destroy method will not be called.
Originally posted by Akhilesh Yadav:
3) As soon as visit any webpage does session gets Automatically started
No , Container creates the session , but you have to initiate the process by calling request.getSession().