Correct and exactly what I am doing now with no problem. What I have
unsuccessfully tried is creating gif images on the fly without
running the program from a command line. I would like to
produce the graphs from live computations using real-time stock prices
rather than reading static images from the database.
AWT libraries and BufferedImage class seem to be the only way
to produce this kind of an image. The only way I can think of getting
around the problem is to connect from the servlet to a CORBA or RMI
program run from an X Window on the server.
Alex Amies
----- Original Message -----
From: David Mossakowski <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 03, 2000 6:41 AM
Subject: Re: Image in page, or background motif
> You don't need to use AWT libraries or BufferedImage or any of this if you
> already *have* an image that you have put into a database. Just read the
image
> from the database and put it into ServletOutputStream.
>
> dave.
>
> Alex Amies wrote:
>
> > Craig or anyone else who knows,
> >
> > I am creating gif images, storing them to a database, and then
> > serving them up via servlets. The difficulty is, however, in order
> > to create the images using a BufferedImage object (which is then
> > fed to a gif codec) I need a graphics environment (BufferedImage
> > is in the awt package). This is not available to a web server or
> > other daemon process, so I get an exception when I try to create the
> > BufferedImage. So I am stuck with running my gif generation program
> > from a X-window while logged on the server machine - not an really
> > ideal situation.
> >
> > Anyone know a a better way to do this? I am dependent on the Graphics2D
> > methods at present for drawing my charts even though it is never
necessary
> > to visibly display anything within the run-time environment.
> >
> > Alex Amies
> >
> > ----- Original Message -----
> > From: Craig R. McClanahan <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, December 31, 1999 9:37 AM
> > Subject: Re: Image in page, or background motif
> >
> > > Jean Bresse wrote:
> > >
> > > > I was wondering about one thing about web page generation by a
servlet.
> > > > Say that you have a web page which contains a picture, or a
background
> > > > motif. Do you need a second servlet to service the picture itself?
> > > >
> > > > There are 2 reasons why I ask this:
> > > >
> > > > 1) With the code I wrote, I'm not able to do it using one servlet
only
> > > > 2) I know that the context of the servlet is set to "text / html".
I'm
> > > > only guessing here that the image is of a different context
> > > >
> > > > Your kind and informative feedbacks on this are MOST appreciated...
> > > >
> > > > Thanks,
> > > >
> > > > Jean
> > > >
> > >
> > > When you use something like <img src="myimage.gif"> in your generated
> > page,
> > > the image is requested by the brower in a separate HTTP request from
the
> > one
> > > that requested this page. If your image is static, you could just set
the
> > URL
> > > of the image to point at a web server to get it, or (if your servlet
> > engine
> > > serves files as well) just let the servlet engine serve it. On the
other
> > > hand, if you need to dynamically create the image (say, you were
graphing
> > some
> > > data that was dynamically selected from a database) you might want to
have
> > a
> > > servlet create it. The key is whatever the image URL points at.
> > >
> > > Craig
> > >
> > >
> >
___________________________________________________________________________
> > > 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
> > >
> >
> >
___________________________________________________________________________
> > 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
>
> --
> David Mossakowski [EMAIL PROTECTED]
> Programmer 212.310.7275
> Instinet Corporation
>
> "I don't sit idly by, I'm planning a big surprise"
>
>
___________________________________________________________________________
> 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
>
___________________________________________________________________________
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