Solved

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

Posted on 2010-11-24
3
1,128 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 Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

820 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