Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
ramu yadiki
Greenhorn
Posts: 13
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends can you explain this thing...

can we call service() and destroy() inside init() of servlet
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic