Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1144
  • Last Modified:

How to retreive PDF from BLOB and open the PDF in Java Struts application

PDF saved in Oracle BLOB data type. How do I retrieve it and open new window to dispaly the PDF under the Struts Java applicatin.  And how to update/re-save a new PDF to that BLOB.
0
CHARLESCHU
Asked:
CHARLESCHU
  • 2
1 Solution
 
objectsCommented:
following shows you how to read the blob

http://helpdesk.objects.com.au/java/how-do-i-convert-a-blob-to-a-byte-array

you to display it you need a servlet to return the pdf similiar to how you return an image

http://helpdesk.objects.com.au/java/how-can-i-return-an-image-using-a-servlet
0
 
CEHJCommented:
You don't want to be reading into memory any longer than necessary, so that's a poor solution
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now