This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes destroy method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "destroy method" Watch "destroy method" New topic
Author

destroy method

Sekhar Kadiyala
Ranch Hand

Joined: Feb 17, 2004
Posts: 170
Does the execution of destroy() method is mandate for every servlet when the servlet is being unloaded?


PMP CSQA SCJP SCWCD SCBCD INS 21 INS 23
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
YES, the container will defintely call the destroy method when the Servlet is not in use by the container.

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: destroy method
 
Similar Threads
destroy() method of servlet.
file change notification
When a Servlet destroy method is called.
can we call destroy method in servlet service method?
How to stop a servlet from executing