I'll assume that you are responding to a request from the browser for the
image (from an <IMG SRC="...">) tag in an html document. You then need to
use res.setContentType("image/jpeg") and res.setContentLength(...) to set up
the response. Then use "OutputStream out = res.getOutputStream();" to get a
byte stream to return the data to the browser and call out.write with the
byte array retrieved from the database.
(*Chris*)
----- Original Message -----
From: bruner dan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 22, 1999 5:34 AM
Subject: sending jpeg from the servlet to the browser
>Hello All,
>
>I'm extracting images from a database and I would like to send them to
>the browser. The extracting part is O.K but displaying it is the problem.
>Can anyone send an example of how it is done?
>
>Thanks
>
>Dan
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html