File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes calling destroy in init method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling destroy in init method" Watch "calling destroy in init method" New topic

calling destroy in init method

clyde melly
Ranch Hand

Joined: Sep 04, 2003
Posts: 152
under what circumstances can i call destroy method from init.shud we call??
Kalai Selvan
Ranch Hand

Joined: Jul 07, 2004
Posts: 79
First of all is there any specific reason to call destroy method in the init method?

destroy method is normally used for freeing the resources held by the servlet. So even if we call the destroy method from init, it will not destroy the object.

Kalai Selvan T.
Don't get me started about those stupid light bulbs.
subject: calling destroy in init method
It's not a secret anymore!