This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "destroy( ) method " Watch "destroy( ) method " New topic

destroy( ) method

Ananth Ram
Ranch Hand

Joined: Jan 18, 2001
Posts: 99

What happens if I call destroy( ) when init( ) is called ??

Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Nothing will happen. destroy() is called by the container when servlet is going to destroy. It is the place provided to the developer to cleanup the resources used.
I agree. Here's the link:
subject: destroy( ) method
jQuery in Action, 3rd edition