Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying image from dbase  RSS feed

 
deshdeep divakar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi
Buddies can any one help me out to displaying
the image stored in dbase
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by looking at what java.sql.ResultSet returns
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html

GetBinaryStream should do it. There is also getBlob.
Then I would learn how to stream binary data to a browser.

I have an example of a servlet that streams images from file that you should be able to rework pretty easily.
http://simple.souther.us
Get SimpleStream and look at the source files in there.

Lastly, don't try to do this from a JSP.
Do it from a servlet.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!