thanks Robert, it's work
the program that store the image in database, need a work-around
----------------------------------------------------
MIMETYPE = multi.getContentType("FILE");
if (MIMETYPE.equals("image/jpg")) {
MIMETYPE = "image/jpeg" ;
}
----------------------------------------------------
Robert Claeson wrote:
>
> Try image/jpeg.
>
> /Robert
>
> Antonio Jimenez <[EMAIL PROTECTED]>
> Sent by: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
> 2000-05-03 13:07
> Please respond to A mailing list about Java Server Pages specification and
> reference
>
> To: [EMAIL PROTECTED]
> cc:
> Subject: images stored in database
>
> hi,
>
> i trying to view images stored in database
> the mime-type image/gif, image/bmp and image/tif(with plugin) work but
> image/jpg don't work
> i am using JSWDK 1.0 on NT and the detail code is
>
>--------------------------------------------------------------------------------------------
> OutputStream salida = response.getOutputStream();
>
> response.setContentType(rs.getString("MIMETYPE")) ;
> response.setContentLength(rs.getInt("TAMANO"));
>
> BufferedInputStream imageData = new
> BufferedInputStream(rs.getBinaryStream("FOTO"));
> byte[] buf=new byte[4*1024];
>
> while ( (len = imageData.read(buf,0,buf.length)) != -1 ) {
> salida.write(buf);
> }
> salida.flush();
>
>--------------------------------------------------------------------------------------------
> any ideas? thanks
> --
> Antonio Jimenez
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets