portals-pluto-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julien (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PLUTO-620) ResourceResponse & content-disposition
Date Fri, 21 Sep 2012 15:38:07 GMT

     [ https://issues.apache.org/jira/browse/PLUTO-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

julien updated PLUTO-620:
-------------------------

    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");
          .....
        }
}



  was:
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 nos 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");
          .....
        }
}



    
> ResourceResponse & content-disposition
> --------------------------------------
>
>                 Key: PLUTO-620
>                 URL: https://issues.apache.org/jira/browse/PLUTO-620
>             Project: Pluto
>          Issue Type: Improvement
>          Components: portal driver
>    Affects Versions: 2.1.0-M2
>            Reporter: julien
>
> 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");
>           .....
>         }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message