Hi,
I call the action from a javascript function:
window.open("printPDF.do"+"?sPrint="+list[i].value,"_blank",);
In the
java action I make:
ouputStream = response.getOutputStream();
response.setContentType ("application/pdf");
response.setHeader("Content-Disposition", "inline; filename=\""+nameFile+"\"");
ouputStream.write(docPDF, 0, docPDF.length);ouputStream.flush();
ouputStream.close();
I think this code is correct, and in fact, I can see the pdf file correctly, but if I try to save the file in my computer (using the "Save as...") the name of the file is not nameFile, the name is "printPDF.pdf". I don't know why.
Thank's a lot