File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Open a pdf using Ajax in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Open a pdf using Ajax in jsp" Watch "Open a pdf using Ajax in jsp" New topic

Open a pdf using Ajax in jsp

Viidhya Kishore
Ranch Hand

Joined: Jan 03, 2007
Posts: 99
Hello all,

I am posting html of a page from jsp and converting it to pdf at the server.
I would like to now open the file in a new window in Jsp. I have the fileName and the directory where the file resides in the jsp.

Any suggestions appreciated.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63854

Not with Ajax, that's for sure.

You need to stream the PDF to the browser in its own response with the correct response type.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Open a pdf using Ajax in jsp
It's not a secret anymore!