Tomcat 5.5 FileUpload资源泄漏
我从互联网上获取了一个 Struts2 FileUpload 示例。上传文件时,我看到在 Tomcat 的工作目录下创建了一个临时文件。
从我的操作类返回后,我在日志中看到以下内容:
WARNING: Resource Leaking: Could not remove uploaded file 'C:\Program Files\apache-tomcat-5.5.28\work\Catalina\localhost\FileUploadApp\upload__668d4a82_126bffe35f7__7ff9_00000002.tmp'
这很奇怪,因为通常在第一个请求时 Tomcat 会删除临时文件,但后续请求它会给我上述警告消息。
有人知道如何解决这个问题吗?
I took a Struts2 FileUpload example from internet. When uploading file I see that a temporary file is created under the Tomcat's work directoy.
After the returning from my action class I see this in logs:
WARNING: Resource Leaking: Could not remove uploaded file 'C:\Program Files\apache-tomcat-5.5.28\work\Catalina\localhost\FileUploadApp\upload__668d4a82_126bffe35f7__7ff9_00000002.tmp'
This is weird because usually on the first request Tomcat removes the temporary files, but subsequen request it gives me the above warning message.
Anyone have any ideas how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论