Solved

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

Posted on 2010-11-24
3
1,116 Views
Last Modified: 2013-11-24
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
Comment
Question by:CHARLESCHU
  • 2
3 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34207325
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 34209300
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 34229353
You don't want to be reading into memory any longer than necessary, so that's a poor solution
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now