开发者

Temporary URLs in a Tomcat REST Server

开发者 https://www.devze.com 2023-02-21 18:23 出处:网络
I have a REST Server running on Tomcat 5.5. Some of the services need to return a temporary URL to contain a generated PDF document. How can I do thi开发者_如何学Pythons in Tomcat? How can I expire th

I have a REST Server running on Tomcat 5.5. Some of the services need to return a temporary URL to contain a generated PDF document. How can I do thi开发者_如何学Pythons in Tomcat? How can I expire the document after a reasonable amount of time.

I could just create the document in memory and store it in some kind of HashMap, but I will lose the document if I have to restart Tomcat, and generating too many documents will cause an out-of-memory error.

I am using RESTEasy 1.2.1 GA as my REST framework.

Thanks.


put it in memcached which support timeout.

0

精彩评论

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