Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3432332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:26:10+00:00 2026-05-18T07:26:10+00:00

I have stored an image in a database using Blob type. Now I can

  • 0

I have stored an image in a database using Blob type. Now I can fetch this image from database using the select. I want to display this image on my jsp. In Jsp i have created a table and want it to be one of the column.

I have blob data how can I convert it back to an image and display it on my jsp page.

Thanks

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:26:10+00:00Added an answer on May 18, 2026 at 7:26 am

    Here are two options:

    Option 1:

    This may not be the best answer, but it will do in a pinch…

    You would need to use a InputStreamReader to read the blob out of the column, and then create a FileOutputStream and then create the file in a ‘created’ images directory. For example if you store you image files in a directory called /pics, you could write the files out to a directory called /pics/generated.

    There are some drawbacks to this approach. For one you would generate a file every time the page is requested. which may work if the files will all have different names.

    Option 2:

    You would use an InputStreamReader to read the blob from the row that is returned from your SQL. Create an OutputStream, using a byte[] as the stream destination. Then it’s just a matter of writing the byte[] out to your JSP

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have stored various records in the MySql database orkut. Now I want to
I am using this example to display images, stored in my File-Stream Enabled database
I have images that are stored in the database as a BLOB. Now I
I am using sqlite database and i have stored the path of image in
I have stored images from the net like this Documents/imagecache/domain1/original/path/inURI/foo.png Documents/imagecache/domain2/original/path/inURI/bar.png Documents/imagecache/... Documents/imagecache/... Now
I am using the following code to bind an image from my database (compact
I have an image stored in sql server. I want to retrieve the image
I am using CodeIgniter 2.1.0 and MySQL database. I have uploaded an image through
I have stored my image as mediumblob in database In my Image bean class
I have the following function which takes a tiff stored as blob from an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.