File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Displaying image with data type as longblob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic

Displaying image with data type as longblob

Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
Hey guys
Recently my tutot gave me a war file that upload image into the database whereby the datatype he make use of is called"Longblob"
And I always had been making use of varchar as my datatype for image and I wrote this code in order to display images from the database.

Do you guys know how to change this piece of code from varchar to longblob in order to display images?
I had tried the blob and the image end upl displaying in binary. But the image I need one is real image

Can I change this rs.getString into code that can retrieve blob images from the database?


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Please do not post the same question more than once.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Displaying image with data type as longblob
It's not a secret anymore!