Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-620

ResourceResponse & content-disposition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0-M2
    • 2.1.0, 3.0.0
    • portal driver
    • 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"); ..... }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            julien8080 julien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: