aspose file tools*
The moose likes Servlets and the fly likes can we call service() and destroy() inside init() of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "can we call service() and destroy() inside init() of servlet" Watch "can we call service() and destroy() inside init() of servlet" New topic
Author

can we call service() and destroy() inside init() of servlet

ramu yadiki
Greenhorn

Joined: Jul 26, 2013
Posts: 13

Hi friends can you explain this thing...

can we call service() and destroy() inside init() of servlet
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

No, you cannot call service. Where would the request and response instances come from?

And yes, you can call destroy() but why would anyone do such a silly thing?

(And, in case you are thinking that destroy() destroys the servlet -- it doesn't.)


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: can we call service() and destroy() inside init() of servlet