This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Nothing prevents you from writing a finalize() in a servlet class. The preferred approach to cleaning up when a servlet goes out of service is the destroy method - see the servlet API. Anybody seriously interested in servlets should have a copy of the API. You can download it for free from this Sun site. The idea is that the servlet container will call your servlet's destroy method when the servlet instance is about to be removed - possibly as part of orderly shutdown of the server, possibly for some other reason. Since you are NOT guaranteed that GC will run during server shutdown, finalize is a bad choice. Bill