Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading a pdf file in a web application

 
souha jerbi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic