This week's book giveaway is in the Programmer Certification forum. We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have a PDF file in my Webcontent/dir/helpdir.pdf and in JSP page i am trying to download the PDF by calling a servlet The PDF is located in Webcontent/dir folder . But when i run the program i am getting filenot found. Please guide me . Below is the code snipet
As Bear pointed out, you can give a direct link to the pdf. But when you click that link, I guess browser would automatically open a pop up and asks you, if you want to save it or open it. Can you try that and see, if mere linking works for you, if not we can think of other options.
posted 8 years ago
Sandesh Shashidhar wrote:Since i need the pdf to display a popup asking do you want to open or save i am not linking it directly.
Whether or not that dialog is shown is a browser setting. There's nothing the PDF can do about it, and very little (possibly nothing) the web app can do about it. You should accept that the user may have other ideas on how to work with files than what your web app would like him to have.
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart: