If I remove "attachment" from the line above, the PDF will display in the browser. If I leave the code as-is, then the user is prompted to either save or view the PDF. If the user chooses to view the PDF, the PDF is displayed in Acrobat. I would like to find a middle ground. I would like to prompt the user to either save or view the PDF, however; if the user chooses to view the PDF, I would like to display it in the browser...not in seperate Acrobat. Is this possible? How? Thank you for the help.
You can't. Either you force a save-as prompt like that or let the browser decide what to do. In the latter case the browser will display the PDF in some way if it can (meaning it has a PDF reader plugin or built-in capability) and otherwise will prevent a prompt asking the user what to do.
PS, this has nothing at all to do with Java per se.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com