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:
DISPLAY=localhost:0
export DISPLAY

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

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


You could use awt to draw the graph to a "Graphics" context and GifEncoder
from Acme Laboratories (www.acme.com) 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 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: Graphics with jsp


Gregor Kovah wrote:

> Hi!
>
> Hmm, this is a bit off topic, but nevertheless:
> You could use KavaChart (www.ve.com), 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?

Nix.

Reply via email to