问题
Led by this comment in a previous question:
Portlet: Forward a ResourceRequest to show the full portal
I was wondering if the best way to generate a dynamic download from a portlet (Like, for example, a dynamically generated PDF or image), is making a ResourceRequest, or if there is a better alternative approach
回答1:
The purpose of ResourceRequests and the serveResource method is to offer a way to serve resources or content fragments. So, yes, using ResourceRequests is a valid way to dynamically create and serve things like PDFs or images.
来源:https://stackoverflow.com/questions/13862722/produce-a-dynamic-download-from-a-portlet