• Post Reply Bookmark Topic Watch Topic
  • New Topic

download image from database.

 
biswajit ray
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m using mysql database. where i m storing an image file whose datatype format is blob.what i want to extract those binary data from the database and populate them in a jsp page.plz help me in this regard.
biswajit.
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to get the image binary stream and write it to your page. Have a servlet which will return an image binary stream and use that servlet as the image source



The servlet:

 
Al Hollis
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one point me to a tutorial.

It appears google is just full of forums with people asking but no good and clear solutions!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben Souther has some good examples of streaming binary content. Find any of his posts and follow the link in his signature.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Ben Souther has some good examples of streaming binary content. Find any of his posts and follow the link in his signature.


They're not hard to find.
He's a big-mouth.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!