Hi, I need urgent help for this please help... I am using tomcat-5.0.19. How i can meke sure that my servlet application is destroyed on shuttingdown the server.I am suspectng that it is not doing...bcz i am getting problem on restarting the server. I am loading the servlet on startup... I am thinking of using eventhandler to catch and freeing resources explicitly whenever the server is going to shutdown.please give some input on this how i can do this? am i in right path? if any other solution is there please give......
Author and all-around good cowpoke
posted 11 years ago
If the server is shutting down properly, the servlet destroy() method should be getting called. Thats a convenient place to ensure that resources are freed and put a System.out.println statement. You could also use a custom class implementing the ServletContextListener interface, but that appears to require more configuration. Bill