I have to store picture in a DB and then I must display them in a web page with HTML,but to display a picture in HTML we have to give the path of the picture and not directely the picture.Is there an other solution?Help me please... And Can I use ImageIcon in a JSP page? [ February 07, 2002: Message edited by: bequibeck ]
For pictures from a database your link should go to a servlet which uses the request information to get the image as a byte array and serve it. You must set the content type and it works best if you set the content length. Bill
"bequibeck" Your name doesn't agree with the javaranch guidelines. Please take a moment and edit your profile after reviewing the guidelines at http://www.javaranch.com/name.jsp Please change your Publicly Displayed name to follow the guidelines. thanks for your cooperation. - satya
Wow, Bill, that is an absolutely excellent solution. I never would have thought of just serving a gif as a byte array. Is it a major performance issue though? I mean, how much slower would it be than just having images in a directory? Would the app server cache the response? Thanks Adam
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
subject: display a picture stored in a DB with HTML