Re: SERVLET-INTEREST Digest - 24 May 2003 to 25 May 2003 (#2003-124)
Paul Copeland <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Organization | JOT Object Technologies |
| Message-ID | <[email protected]> |
You already have the "file" stored in the database so you might not want to store it again in a temporary file. You get into messy issues around maintaining and cleaning up a cache of temporary files, as well as concurrency issues if you don't use unique names for the temporary files. A more direct way is to write the bytes of the blob directly into the servlet response OutputStream and set the Content-Type header to "image/jpeg". You do this with a Servlet (not with JSP). How you read the bytes from the blob depends on which database you are using, even with JDBC. -- Paul Copeland, JOT Object Technologies - http://www.jotobjects.com > > ------------------------------ > > Date: Mon, 26 May 2003 11:34:37 +0530 > From: vikramjit singh <[email protected]> > Subject: Re: Show Bolb image data by Servlet > > The image when you retrieve, store it in a physical location on the server > .jpg or whichever image format. And call it how you use in html page. > > -----Original Message----- > From: A mailing list for discussion about Sun Microsystem's Java Servlet > API Technology. [mailto:[email protected]]On Behalf Of > Souvik Basak > Sent: Monday, May 26, 2003 10:10 AM > To: [email protected] > Subject: Show Bolb image data by Servlet > > > Hi, > How can I show A BLOB Image data, retrieved from Oracle Database > (using ResultSet.getBlob()), on the Web page with the help of > servlet/JSP. > regards, > Souvik Basak ___________________________________________________________________________ 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