title: Set filename of the Pdf that is streamed back to the browser
body: <p>I have a Java webapp creating a pdf and streaming it back to the browser. </p>
  
  <pre><code> byte[] pdf = report.exportPdfToArray(user);
  response.setContentType("application/pdf");
  response.setHeader("content-disposition", "inline; filename=\"My.pdf\"");
  outStream = response.getOutputStream();
  outStream.write(pdf);
  outStream.flush();
  outStream.close();
  </code></pre>
  
  <p>The report is executed and it is sent back to the browser, but I can not control the name of the file even though I set the <code>content-disposition</code>.
  I am using Jboss 4.2.1. Do you know what am I missing?</p>
  
  <p><strong>EDIT</strong>: So is there any way to set the filename when the content-disposition is inline?</p>