A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
can we call service() and destroy() inside init() of servlet
Joined: Jul 26, 2013
Mar 17, 2014 10:10:23
Hi friends can you explain this thing...
can we call service() and destroy() inside init() of
Author and ninkuma
Joined: Jan 10, 2002
Mar 17, 2014 10:38:53
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
Books by Bear
I agree. Here's the link:
subject: can we call service() and destroy() inside init() of servlet
can we call destroy method in servlet service method?
Servlet's init() and destroy() method and constructors
call detroy in init
Question on Servlet Redirection
destroy() method of servlets
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014