wood burning stoves 2.0*
The moose likes Servlets and the fly likes calling destroy() in init() method in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

calling destroy() in init() method in servlet

priyanaka jaiswal
Ranch Hand

Joined: Jun 03, 2011
Posts: 79
Hi All,

Calling destroy() method inside init() will it destroy the servlet or init() method will continue it process?

Thanks in advance
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60780

It will simply call the method. Why would you even wonder about doing something so nonsensical?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

That exact question is already in the Ranch's Servlets FAQ. Have a look there.
I agree. Here's the link: http://aspose.com/file-tools
subject: calling destroy() in init() method in servlet
Similar Threads
destroy() method of servlet.
Servlet Destroy() Method
what code will be there in init() of GenericServlet
Calling destroy() inside init()
calling destroy() from init()