Struts 2
  1. Struts 2
  2. WW-3506

JasperReports PDF does not display in IE using HTTPS

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3.20
    • Component/s: Plugin - JasperReports
    • Labels:
      None
    • Environment:

      Windows; Internet Explorer 6, 7, 8; HTTPS

      Description

      Internet Explorer does not normally cache items from HTTPS sites, so cannot store PDF documents prior to launching Adobe Reader.
      See http://support.microsoft.com/kb/323308

      Change JasperReportsResult.java ~ line 285 to add the following:

              if ("https".equalsIgnoreCase(request.getScheme()))
      		{
              	// set the the HTTP Header to work around IE SSL weirdness
              	response.setHeader("CACHE-CONTROL", "PRIVATE");
              	response.setHeader("Cache-Control", "maxage=3600");
              	response.setHeader("Pragma", "public");
              	response.setHeader("Accept-Ranges", "none");
      		}
      

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1391d 12h 42m 1 Lukasz Lenart 08/Jul/14 21:30
        Resolved Resolved Closed Closed
        188d 15h 28m 1 Lukasz Lenart 13/Jan/15 11:58
        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Struts-JDK6-develop #53 (See https://builds.apache.org/job/Struts-JDK6-develop/53/)
        WW-3506 Adds additional Http headers to solve problem with IE (lukaszlenart: rev 01e33809804c513f414a29e68626cff372dfbbdb)

        • plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
        Show
        Hudson added a comment - FAILURE: Integrated in Struts-JDK6-develop #53 (See https://builds.apache.org/job/Struts-JDK6-develop/53/ ) WW-3506 Adds additional Http headers to solve problem with IE (lukaszlenart: rev 01e33809804c513f414a29e68626cff372dfbbdb) plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
        Lukasz Lenart made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Lukasz Lenart [ lukaszlenart ]
        Resolution Fixed [ 1 ]
        Hide
        ASF subversion and git services added a comment -

        Commit 01e33809804c513f414a29e68626cff372dfbbdb in struts's branch refs/heads/develop from Lukasz Lenart
        [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=01e3380 ]

        WW-3506 Adds additional Http headers to solve problem with IE

        Show
        ASF subversion and git services added a comment - Commit 01e33809804c513f414a29e68626cff372dfbbdb in struts's branch refs/heads/develop from Lukasz Lenart [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=01e3380 ] WW-3506 Adds additional Http headers to solve problem with IE
        Lukasz Lenart made changes -
        Description Internet Explorer does not normally cache items from HTTPS sites, so cannot store PDF documents prior to launching Adobe Reader.
        See http://support.microsoft.com/kb/323308

        Change JasperReportsResult.java ~ line 285 to add the following:

                if ("https".equalsIgnoreCase(request.getScheme()))
        {
                 // set the the HTTP Header to work around IE SSL weirdness
                 response.setHeader("CACHE-CONTROL", "PRIVATE");
                 response.setHeader("Cache-Control", "maxage=3600");
                 response.setHeader("Pragma", "public");
                 response.setHeader("Accept-Ranges", "none");
        }
        Internet Explorer does not normally cache items from HTTPS sites, so cannot store PDF documents prior to launching Adobe Reader.
        See http://support.microsoft.com/kb/323308

        Change JasperReportsResult.java ~ line 285 to add the following:
        {code:java}
                if ("https".equalsIgnoreCase(request.getScheme()))
        {
                 // set the the HTTP Header to work around IE SSL weirdness
                 response.setHeader("CACHE-CONTROL", "PRIVATE");
                 response.setHeader("Cache-Control", "maxage=3600");
                 response.setHeader("Pragma", "public");
                 response.setHeader("Accept-Ranges", "none");
        }
        {code}
        Lukasz Lenart made changes -
        Field Original Value New Value
        Fix Version/s 2.3.x [ 12319176 ]
        Andrew McCallum created issue -

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Andrew McCallum
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development