wood burning stoves*
The moose likes Servlets and the fly likes Using ImageFileOutputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Using ImageFileOutputStream" Watch "Using ImageFileOutputStream" New topic
Author

Using ImageFileOutputStream

Ola Daniel
Ranch Hand

Joined: Jul 27, 2005
Posts: 105
I want to display Images from a database into a JSP page. Now i am using the following code:


I succesfully used this code to retrieve the image from the DB into a file. then use the file to display on my JSP. The problem is this works fine with MSSQL database. But with Oracle the files get written, but cannot be viewed. I think there is some kind of corruption of the image when its transfered from the DB. I am attempting to use: javax.imageio.stream.FileImageOutputStream instead of java.io.FileOutputStream which I am using but i donot know how to use it. Can anyone please let me know hopw to use this instead or direct me to where i can get a sample code. Thanks in advance.


SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ImageFileOutputStream
 
Similar Threads
Inserting & Retrieving Images from MSSQL
Displaying Image from database on to the screen
Display of image in JSP from data base using servlet
Display of image in JSP from data base using servlet
How to retrieve images from mysql database into a portlet