This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
Posts: 66207
151
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
Boost this thread!