File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
preview of pdf files in browsers.
Passed IBM WebSphere Portal V5.0, Application Development Test 348
web application + print link
Embeding RTF on Web Page
Read PDF File Path From Servlet. PDF is right under WebContent