jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes reading a pdf file in a web application 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 » Frameworks » Struts
Bookmark "reading a pdf file in a web application" Watch "reading a pdf file in a web application" New topic
Author

reading a pdf file in a web application

souha jerbi
Greenhorn

Joined: Apr 13, 2009
Posts: 15
hi,
i saved a pdf file in my database and want to have an idea about the method that allow me to open the file in a web appliction , how may i give in my java class the information that my file will be opened with the pdfreader?
thanks a lot.
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


Souha,

1) Retrieve data using resultSet getBinaryStream( assuming its BLOB)
2) Write the data to the SerlvetOutputStream
3) Set the response content type to application/pdf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading a pdf file in a web application