This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to download a file from a blob column in the database in my action class. I know that blob object was correclty populated in the first place by uploading a file. I can verify that by clicking the blob field in TOAD. No matter what the size of the file is, it always downloads only 3k, and when i try to open the file, it says it cannot determine the type of the file. I am using Oc4j Application server with oracle database(220.127.116.11). I got the latest jdbc driver for this database version and put in my oc4j lib folder. My action class looks like:
Initially that was what i was doing trying to do, to write to ServletOutputStream from the response object. But i kept on getting "Writer already retrieved error", so i used FileOutputStream instead. But finally i figured out why i was getting the error while using response.getOutputStream(). So myster solved . Thanks