This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Life Cycle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Life Cycle" Watch "Servlet Life Cycle" New topic
Author

Servlet Life Cycle

Pubudu Fernando
Greenhorn

Joined: Oct 12, 2011
Posts: 5
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

Joined: Jan 10, 2002
Posts: 61103
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pubudu Fernando
Greenhorn

Joined: Oct 12, 2011
Posts: 5
wow.. that was quick... thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet Life Cycle