This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
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

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
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: 63060

Please do not post the same question more than once.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Displaying image with data type as longblob
jQuery in Action, 3rd edition