开发者

IceFaces and FileResource - delete after session expires

开发者 https://www.devze.com 2023-02-09 02:16 出处:网络
I\'m using Icefaces. I generate reports for users and provide it using FileResource class. I do nothing with the file, since it should be available for download whenever user clicks on link to resourc

I'm using Icefaces. I generate reports for users and provide it using FileResource class. I do nothing with the file, since it should be available for download whenever user clicks on link to resource.

However, after user logs out, th开发者_如何学Goe report is no longer needed and should be deleted. Is there a build-in option in IceFaces to bind FileResource with session and automatically delete it when session expires?


Resource binds to a file which already exists when you are binding it to a Resource. It is expected that the file would be needed again, so there is probably no point in providing a method to delete the file.

The IceFaces tutorial on FileUpload talks about manually deleting files after session expiry using a session listener. So I guess IceFaces does not provide any method to delete files, whether or not they are binded to a Resource.

0

精彩评论

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