Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.1.0-M2
-
None
Description
I use serveResource in my portlet to comply jsr-286 when serving pdf dile.
Unfortunalety I found no way to set content-disposition in http response header. (ResourceResponse.setProperty has no effect for this property).
Example of code:
@Override
public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException {
if (EDITION_RESSOURCE_ID.equals(request.getResourceID()))
{ response.setContentType("application/pdf"); response.setProperty("Content-Disposition", "attachment; filename=test.pdf"); ..... }}