I am using the following code to open a pdf file. A button is located on my JSP to fire the code. The problem is the pdf file opens in the calling browser window. the users want to see it open in a separate browser window.
If you use "attachment" instead of "inline" in your Content-Disposition header, the browser will either open the application in a new window (if there is an associated application for this mime type) or prompt the user to either "Save As" or "Open With".