Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

JSP designed for Excel download breaks when site is secured.

jkazjkaz Member Posts: 2
I have an application that generates reports using a backend Oracle database and presents them either as html or as Excel (either inline via the plugin or as a download).

I support two version of each report, one that is used for tab-separated Excel output. The file looks like this:
<%@ page language="java" contentType="application/vnd.ms-excel;charset=WINDOWS-1252" import ...
...
response.setHeader("Content-Disposition","attachment; filename=callDetail.xls;");
...

This allows a pop-up for a user-choice of open or save. These features have always worked great.

Now, to the problem. We've just secured the site with a server-side digital certificate and require all traffic to be SSL, via 'https'.

Requesting the Excel version of any JSP causes the following error:
"IE cannot download from mydomain.xyz.com", "IE was not able to open this internet site. The requested site is either unavailable or cannot be found. Please try again later"

However, the html version of these JSPs still work correctly. Any ideas?

Comments

  • jkazjkaz Member Posts: 2
    This is a Microsoft "feature", see
    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q316/4/31.asp&NoWebContent=1

    In a nutshell, IE tries to write the content of this page to it's cache, then tell MS Excel to read the cache. But, the no-cache response header has been set. The file is not there, so Excel cannot open it. Turn off no-cache and the problem is fixed.

    : I have an application that generates reports using a backend Oracle database and presents them either as html or as Excel (either inline via the plugin or as a download).
    :
    : I support two version of each report, one that is used for tab-separated Excel output. The file looks like this:
    : <%@ page language="java" contentType="application/vnd.ms-excel;charset=WINDOWS-1252" import ...
    : ...
    : response.setHeader("Content-Disposition","attachment; filename=callDetail.xls;");
    : ...
    :
    : This allows a pop-up for a user-choice of open or save. These features have always worked great.
    :
    : Now, to the problem. We've just secured the site with a server-side digital certificate and require all traffic to be SSL, via 'https'.
    :
    : Requesting the Excel version of any JSP causes the following error:
    : "IE cannot download from mydomain.xyz.com", "IE was not able to open this internet site. The requested site is either unavailable or cannot be found. Please try again later"
    :
    : However, the html version of these JSPs still work correctly. Any ideas?
    :

Sign In or Register to comment.