I need to send to the client a byte[] with a pdf data from my tomcat server. I'm using this:
response.setContentType("application/pdf");
response.setHeader("Content-Disposition:","inline; filename=test.pdf");
But (at least) with firefox I get a file download instead of inline display. The only way to show pdf data inline is to remove the Content-Disposition header record however, if I do so I cannot set the filename, the pdf name is get from the last folder of url.