Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : J2EE : JSP : HttpServlet Destroy Method Signup · Login
Author Thread
HttpServlet Destroy Method
Posted in tutorial: Introduction to Java Servlets, Developing your first Java Servlet
·  srijava
User
Joined: 17 Mar 2003
Total Posts: 1
HttpServlet Destroy Method
Posted: 17 Mar 2003
In HttpServlet destroy method of servlet is not called when server(Tomcat4.0) is stopped
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 547
Re: HttpServlet Destroy Method
Posted: 28 Oct 2007
The destroy() method does get correctly called. I have tried it and I know it does get called when it should.

Try to add the following method to TestServlet.java:

public void destroy() {
log("TestServlet.destroy()");
}
Start and stop the Tomcat server. You will find the string "TestServlet.destroy()" in the log file localhost.2007-10-28.log (substitute the year/month/day with your local year/month/day).

Faisal Khan.
Stardeveloper.com

Users Subscribed To This Thread
srijava  

Users Who Have Visited This Thread In Last 24 Hours
7 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.