Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
shyamkumar bopannachengalaiah wrote:i need to display a set of images randomly by retreiving the images from database.I need code for it .I have to display in particular table in my webapplication.
JSP outputs HTML.
In HTML, images are represented by the <img> tag.
In <img>, the 'src' attribute should point to a valid URL of an image stream.
A valid URL of an image stream can be either a static image, or a dynamic image.
A dynamic image can be served by a servlet which takes a parameter representing the image ID, reads the image from the DB as an InputStream and writes it to the OutputStream of the response.
If you need public code, just Google the smart way. "ImageServlet" or so.
Pay attention! Tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss