I have the jsp file below:
byte[] file=null;
String ctype ="application/pdf";
RispostaPdf risposta = (RispostaPdf) session.getAttribute(Costanti.ATTRIBUTE_FILE_PDF);
String docName = risposta.nomeFile;
response.setContentType("" + ctype + "; name=\"" + docName + "\"");
//response.setCharacterEncoding("ISO-8859-1");
response.addHeader("Content-disposition", "inline; filename=\"" + docName + "\"");
file = risposta.modulo;
try {
OutputStream outStrm = response.getOutputStream();
outStrm.write(file);
outStrm.flush();
outStrm.close();
} catch (Exception e) {
out.println(e);
e.printStackTrace();
}
//response.flushBuffer();
session.removeAttribute(Costanti.ATTRIBUTE_FILE_PDF);
to open a pdf doc in a new tab. When i save a pdf from chrome is saved with the correct name (docName):
filename=\"" + docName +
In IE the last version (11/10/9) is saved as downloadServletName.pdf:
Anyone know how can i change the saved file name as "filename=\"" + docName" in IE?