tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Adamovic <ad...@blic.net>
Subject Re: Commons fileUpload: write to disk permission problem
Date Mon, 26 Jun 2006 20:49:55 GMT
Tim Lucia wrote:
> Have the
> servlet set the response type to image/jpeg or image/png or whatever is
> appropriate, and then stream the bytes out of the blob from the DB.
>   
Hm, that is something interesting what I need also.
As I quickly wrote down that code it should be:
       byte[] mybytes=// get image from the database
        response.setContentType("image/jpeg");
        ServletOutputStream stream = response.getOutputStream();
        stream.write(mybytes);

Right?
Andrea Salvi (or whoever who started this discussion), please
post code you will use :).


-- 
Mladen Adamovic
http://www.online-utility.org  http://www.shortopedia.com 
http://www.froola.com  http://www.gift-idea4u.com



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message