tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Weissenbacher <>
Subject RE: Graphics with jsp
Date Wed, 22 Aug 2001 12:52:19 GMT
unfortunately this doesn't work on linux unless you have an running X server
or Xvfb, a virtual X server. you have to set the display variable to access
the X server in this way:
export DISPLAY

i've heared that this problem will be removed in jdk1.4

-----Original Message-----
From: Jim Urban []
Sent: Wednesday, August 22, 2001 2:46 PM
Subject: RE: Graphics with jsp

You could use awt to draw the graph to a "Graphics" context and GifEncoder
from Acme Laboratories ( to convert the image to a gif which
you can simply return to the browser by setting the content type to
"image/gif".  GifEncoder is free.  Attached is a servlet which shows how to
do this.  This sample shows how to send the image back to the browser
directly.  You could also create the image as file and use an img tag to
include it in the HTML sent back to the browser.

Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL  60143
Voice:  (630) 250-3045 x2164
Fax:  (630) 250-3046

-----Original Message-----
From: Nikola Milutinovic []
Sent: Wednesday, August 22, 2001 7:27 AM
Subject: Re: Graphics with jsp

Gregor Kovah wrote:

> Hi!
> Hmm, this is a bit off topic, but nevertheless:
> You could use KavaChart (, which you can use in Servlets and
> JSPs, but unfortunately it is not free.

Why not the good old "Fly"? It is a C compiled CGI program that takes a
"command file" and draws a GIF following those commands. All the
JSP/servlet needs to do is create a command file.

Is there something equivalent in Java?


View raw message