开发者

Recommendations around cleaning-up/deleting files present in Tomcat temp Dir

开发者 https://www.devze.com 2023-02-19 16:18 出处:网络
What are some of the best practices around deleting/cleaning up files 开发者_JAVA百科present inside temp dir on Tomcat-6. The files are images created by charting packages, numerous files created by v

What are some of the best practices around deleting/cleaning up files 开发者_JAVA百科present inside temp dir on Tomcat-6. The files are images created by charting packages, numerous files created by various applications deployed on the web server. The required lifetime of the file is the duration of a user session. I would appreciate if anyone provide recommendations/pros-cons regarding best practices related to this - whether i should be looking at HttpSession Listener, Servlet Context Listener, cleaning up on startup, Spring based approach etc.


There are no "best practices" for this. There are just methods that work or don't work, depending on the application requirements.

And the key requirement is the required lifetime of the file. Is it required for just the duration of a request? For the duration of a user session? For some other period; e.g. until the user "collects" it?

0

精彩评论

暂无评论...
验证码 换一张
取 消