Actually I am trying to preview a pdf in chrome and download it. I am writing the byte array in the servlet response object and setting the following headers.
response.setContentType("application/pdf; charset=utf-8");
response.setHeader("Content-Disposition", "inline; filename="+fileName+".PDF");
and in jsp action target="_blank".
when I click download button. PDF file is open in new tab. But when I tries to download then it is showing "network error" in chrome and other browsers except firefox.
The actual file format is like 12345.PDF Is there any contentType issue occurs bw .PDF and .pdf