This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Life Cycle

 
Pubudu Fernando
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii i'm new to servlets and i've read that the container calls destroy() on the servlet.. so then how would the container know when to call destroy()?? does it do so when the server is about to shut down?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can do so whenever it likes. Surely it will call destroy() when it's shutting down, but if it decides to take the servlet out of service for any other reasons, it will also call the method.
 
Pubudu Fernando
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow.. that was quick... thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic