zhoupan / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

Export to Excel fails in secure pages (HTTPS) #310

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

We have been using Jmesa for a while on our PROD server.
Recently we moved to https with SSL in our server.
Starting then, the export to excel doesnt work.

Says : IE could not find the url.

I found something similar to this issue in 
http://code.google.com/p/jmesa/issues/detail?id=182&can=1&q=Export%20to%20PDF%20
fails%20in%20secure%20pages%20(HTTPS)

Any help will be appreciated!

Thanks

Original issue reported on code.google.com by vidhya.a...@gmail.com on 29 Mar 2011 at 7:25

GoogleCodeExporter commented 9 years ago
Does Jmesa introduce a "no-cache" header in response?
PROD issue.
Please help!

Original comment by shrividh...@gmail.com on 30 Mar 2011 at 2:38

GoogleCodeExporter commented 9 years ago
You can see the header response settings in the AbstractViewExporter class. 

public void responseHeaders(HttpServletResponse response)
        throws Exception {
  response.setContentType(getContextType());
  String encoding = coreContext.getPreference(ENCODING);
  if (encoding == null) {
      encoding = Charset.defaultCharset().name();
  }
  String fn = new String(fileName.getBytes(encoding), encoding);
  response.setHeader("Content-Disposition", "attachment;filename=\"" + fn + "\"");
  response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
  response.setHeader("Pragma", "public");
  response.setDateHeader("Expires", (System.currentTimeMillis() + 1000));
}

I wish there was more that I could say...I have not had to export with https 
yet and have not had the issue.

Original comment by jeff.johnston.mn@gmail.com on 30 Mar 2011 at 9:52