wood burning stoves 2.0*
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

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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: 61451

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] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Open a pdf using Ajax in jsp