File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When will the instance of Servlet be deleted?

 
dylan shen
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After an object of Servlet is created, it will stay in server until the server down?
Or there are some cases that the object will be deleted?
Thanks
 
ersin eser
Ranch Hand
Posts: 1072
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever the servlet container determines that a servlet should be unloaded, perhaps to reclaim some resources or because it is being shutdown, the server calls the servlets's destroy method after allowing all of the servlet's service() threads to complete ( or a server-defined time-limit) The servlet is then eligible for a GC. The servlet container is not required to keep a servlet loaded for any specific amount of time.
 
dylan shen
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see
Thanks for your help
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic