This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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