I have a Java webapp creating a pdf and streaming it back to the browser.
byte[] pdf = report.exportPdfToArray(user);
response.setContentType(\"application/pdf
MSIE will use the last part of the path info of the request URL (the part after the last /
) as the default filename of the Save As action. It ignores the filename
attribute of the Content-Disposition
header altogether. All other browsers treat that header properly.
You need to change the URL pattern of your PDF servlet to a path mapping. I.e. do not use /pdf
with http://example.com/context/pdf, but rather use /pdf/*
with http://example.com/context/pdf/report.pdf. This way MSIE will use "report.pdf" instead of "pdf" as the default filename for the Save As action.