Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To retrieve an image from the database and display it in a JSP page

 
Vivek Puthiyonnan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to read an image (blob datatype) from oracle database and display on browser in a JSP page without writing the image on the hard disk.

Can you tell me how can i go forward to display the image on my browser.
 
Jan Cumps
Bartender
Posts: 2608
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is not suited to deliver binary data.
You will have to create a servlet that gets the data from the db and streams it.
You can use an <image> tag in your (JSP) web page, and put the URL for your Servlet into the href property.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic