DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24961>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24961 Temporary files marked "deleteOnExit" not deleted when Tomcat runs as NT Service Summary: Temporary files marked "deleteOnExit" not deleted when Tomcat runs as NT Service Product: Tomcat 4 Version: 4.1.29 Platform: PC OS/Version: Windows XP Status: NEW Severity: Major Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I've written a simple JSP to illustrate: <%@ page contentType="text/html;charset=UTF-8" session="false" import="java.io.*"%> <% ServletContext servlet_ctxt = getServletContext(); File temp_directory = (File)servlet_ctxt.getAttribute ( "javax.servlet.context.tempdir" ); File new_temp_file = File.createTempFile ( "test", "file", temp_directory ); new_temp_file.deleteOnExit(); %> Just make this available to Tomcat, run Tomcat as a console app, and when you CTRL-C to quit Tomcat, those files will disappear. However, do the exact same thing using Tomcat as a service, and when you "net stop Apache Tomcat 4.1", those files will still exist. I've found a workaround for my particular use of temp files, but I think that it would be best if this was fixed. I believe the issue relates to how tomcat.exe is killing the Java process, but I'm not entirely sure. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
