tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ozgur Sahoglu <oz...@konnektia.com>
Subject RE: Html/jpg from db to client?
Date Mon, 22 Apr 2002 16:54:38 GMT

how do you store your image files in your DB? as BLOB objects or as
references to image files at some location?

Ozgur.

> -----Original Message-----
> From: john-paul delaney [mailto:jp@justatest.com]
> Sent: Monday, April 22, 2002 3:15 AM
> To: Tomcat Users List
> Subject: Re: Html/jpg from db to client?
>
>
> On Mon, 22 Apr 2002, Nikola Milutinovic wrote:
>
> Thanks Nix... then I'm thinking I need three servlets to handle
> for each page sent to the client... 1. Write the html header, 2.
> Get image from db and send the image, 3.Add in dimensions to <img
> tag> & add the footer.
>
> Is this correct?
>
> regards
> /j-p.
>
> > If you wish to send BOTH html and the image in the same
> invocation of the servlet, then you're mistaken. HTTP/HTML, in
> general, doesn't work that way. You should make a servlet which
> can retrieve a single picture, something like:
> >
> > /servlets/showImage?src=my_test_pic.gif
> >
> > Then make your servlet accept "src" parameter, retrive the
> image from the database. Based on the extension you should set
> the correct MIME type, in this case "image/gif" and send it. You
> should set Response->contentType to your MIME type and open a
> servlet output stream in the Response and just splash your image into it.
>
>
> -----------------------
>  JUSTATEST Art Online
>   www.justatest.com
>
>
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message