Please confirm (conf#8b0a4866adb94c0d63ba93737b36599d)
"Eric J. Chet" <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
<< IMPORTANT INFORMATION! >> This is an automated message. The message you sent (attached below) requires confirmation before it can be delivered. To confirm that you sent the message below, just hit the "R"eply button and send this message back (you don't need to edit anything). Once this is done, no more confirmations will be necessary. << INFORMAÇÃO IMPORTANTE >> Esta é uma mensagem automática A mensagem que você enviou (em anexo) requer confirmação antes de ser entregue. Para confirmar o envio basta pressionar o botão de "Reply" e enviar esta mensagem de volta (não é necessário editar). Uma vez que isto seja feito, novas confirmações não serão necessárias. This email account is protected by: Active Spam Killer (ASK) V2.2 - (C) 2001-2002 by Marco Paganini For more information visit http://www.paganini.net/ask --- Original Message Follows --- Date: Mon, 7 Apr 2003 16:44:06 +0200 From: Adrian Janssen <[email protected]> Subject: Re: How to display a jpeg msql Blob field To: [email protected] The servlet should dump out JUST the image binary data and NO html at all - as you have set the content type to "image/jpeg". This tells the browser to expect the raw binary data of an image. In general how this would be done ia that there are two servlets. The main one that renders out the the html of the table includeing an <img> tag that has as its source attribute the url of a second servlet (possibly with parameters), and this second servlet does what you seem to be attempting in your code snippet: render out just the raw binary of the image. Cheers Adrian > -----Original Message----- > From: Bob Prah [SMTP:[email protected]] > Sent: 07 April 2003 04:38 > To: [email protected] > Subject: How to display a jpeg msql Blob field > > Hi to All, > > I am having difficulties trying to display a jpeg Blob field from a mysql > table in a servlet. All other fields from this table render their text > fields apart from this particular jpeg Blob field - it'll simply not > display anything at all. > > Has anyone dealt with with a similar situation using mysql and how? > > Will be appreciate any help. > > > Thank you, > > Bob. > > Here is snippet from my code: > <<<< > ..... > > Connection con; > ResultSet res=null; > > public void service(ServletRequest request, ServletResponse response) > throws ServletException, java.io.IOException { > > response.setContentType("image/jpeg"); > PrintWriter out = response.getWriter(); > > try { > (Original message truncated) ___________________________________________________________________________ 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