Friday, August 9, 2002 06:53 AM
change the mime type of the response to the appropriate image...
httpResponse.setContentType( "image/gif" );
httpResponse.setContentType( "image/jpeg" );
then get the bytes from the db, and write them out to the response output stream. that's it. note that you'll need more than one servlet/jsp to create a webpage using this method. i.e. you can't but html text and ninary images in the exact same response. so use one servlet to generate the html, which has an
tag which calls your image servlet.