destroy() method not called Tomcat7 Windows 7
0 posts in topic
Thread View Thread View
TOPIC ACTIONS:
 

destroy() method not called Tomcat7 Windows 7...
desain
Wed May 29, 2013 04:09 PM

Hi All,

New to this forum and servlets writing but hopefully everyone's experience here will help. I am running Tomcat 7 on a Windows 7 Machine and am learning to write servlets however I am stuck while trying to follow a tutorial.

In destroy() I am writing a simple file using FileOutputStream to store the date the servlet was first called.

However, destroy() method is not called. I verified this by println() as well as moving the file creation to init().

When moved to init() the file is created just fine, and on next load I can read the file fine. I am convinced destroy() is not called.

I stop the service via the manager (the little icon on the bottom "stop service");

Why is destroy not being called?

About | Sitemap | Contact