As of Tomcat 4.1.19 the manager will remove the tempdir when you /remove a web application.
In your case I would add some code to a servlet init method to cleanup the old temporary files. Then configure the servlet to load on startup. I would not want the manager to muck around with the tempdir of an installed web application. There are many things that can get saved in the tempdir. JSP .java and .class files, serialized session data, etc. I think it is best if the code which generates temp files in the tempdir manages its own files. Regards, Glenn Shapira, Yoav wrote:
Howdy, So tomcat provides a temporary directory per-cotnext accessible via javax.servlet.context.tempdir per the 2.3 Servlet Specification. No problem there. I don't think the spec (including the 2.4 PFD version) says anything about cleaning up the temporary directory. Does tomcat provide any mechanisms for administrative cleanup (e.g. via the manager app) of the temporary directories? Does tomcat provide any mechanism, e.g. a configuration parameter on the <Context> tag, for automatic cleanup of the temporary directory when the context is shut down? Does anyone think these things would be useful? My current scenario is a webapp that needs to write temporary files (intermediate things in large scientific calculations) to disk. I write them to the context temporary directory. One part of the cronjob that periodically (weekly) restarts tomcat cleans up the tempdir. This works fine, but I'm wondering if there's a better way. Any ideas, opinions, etc. will be appreciated. If people think it's useful, I could write and contribute some code to implement one or more of the above in tomcat 4.1.x / 5.x. Thanks, Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]
-- ---------------------------------------------------------------------- Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder | MOREnet System Programming | * if iz ina coment. | Missouri Research and Education Network | */ | ---------------------------------------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>