Though you don't destroy a servlet, it's the job of container.
But if you will call System.exit() or you will shutdown the server then container will destroy the all the servlets... Right??? :roll:
Author and all-around good cowpoke
Joined: Mar 22, 2000
If what you want is to prevent a servlet from responding to requests, have it throw a javax.servlet.UnavailableException - the container will then reject requests. In the Tomcat servlet engine you can use the Manager interface to stop, start or reload an entire "web application" - which might be many servlets and jsp. In case you are wondering, the destroy() method is part of the servlet life cycle controled by the container and should never be called by your program. It exists so you can clean up resources used by the servlet when the container is removing the instance for some reason. Bill