download « PDF « JSP-Servlet Q&A

2. PDF Download Servlet Problem

Hi guys, I'm having issues creating a file download servlet to download pdf files. I can successfully download text files using this code. For some reason however I cannot download a pdf using the same code. On execution, the browser will present me with a dialogue box asking me to open, save or cancel. If i open or save and open ...

3. Downloading a PDF using JSP-JS-Java Servlet

Okay... so that's your servlet code. Doesn't look too bad. But you said your web page was submitting the request via JQuery, didn't you? In which case it's your responsibility to handle the response which is sent back to you. Don't expect the browser to handle it -- the browser doesn't handle the responses for JQuery requests. Of course now that ...

4. Downloading the PDF file from server

6. Download pdf code in java servlet