Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Server side GIF generation

0 views
Skip to first unread message

Arvind

unread,
Feb 3, 1998, 3:00:00 AM2/3/98
to
I would like to know what would be most appropriate method to send
server-side generated GIF graphs (bar, pie, plots, curves) to the browser?

Does there any Servlet (server side Java) product exists to in the market?

Or would it be better to opt for client side Java applets instead of GIF generation?

Can any one of you send relevant URLs or related information source where I can find comparative evaluation of existing technologies for this purpose?

Arvind

 

Matt Landau

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

In article <6b83m7$ksi$1...@news.uni-c.dk>, "Arvind" <arv...@cyberspace.org> wrote:
>I would like to know what would be most appropriate method to send
>server-side generated GIF graphs (bar, pie, plots, curves) to the =
>browser?

Using servlets for server-side generation of dynamic content is a big win.

>Does there any Servlet (server side Java) product exists to in the =
>market?

There are many examples of servlet engines and application frameworks that
support servlets (among other things). You can find a list of environments
that provide various levels of servlet support at

http://jserv.javasoft.com/products/java-server/servlets/environments.html

They range from simple servlet engines like the JSDK or JRun all the way up to
full-blown server-side Java application frameworks like Dynamo.

--
Matt Landau

Waiting for a flash of enlightenment in all this blood and thunder.

todd

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

I'd like to know the answer to this as well. From my research it
seems that if you try to use any of the JDK's graphic functions
(AWT) the servlet needs to have access to an X-Server (server is
UNIX, might be different under WINdoze). Obviously this is
unacceptable for a server side application. I've since
gone back to using perl for my server-side graphics work.
Later
Todd

Arvind (arv...@cyberspace.org) wrote:
: I would like to know what would be most appropriate method to send
: server-side generated GIF graphs (bar, pie, plots, curves) to the =
: browser?

: Does there any Servlet (server side Java) product exists to in the =
: market?

: Or would it be better to opt for client side Java applets instead of GIF =
: generation?

: Can any one of you send relevant URLs or related information source =
: where I can find comparative evaluation of existing technologies for =
: this purpose?

: Arvind

: ------=_NextPart_000_0008_01BD30F6.E27C0AB0
: Content-Type: text/html;
: charset="iso-8859-1"
: Content-Transfer-Encoding: quoted-printable

: <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
: <HTML>
: <HEAD>

: <META content=3Dtext/html;charset=3Diso-8859-1 =
: http-equiv=3DContent-Type>
: <META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
: </HEAD>
: <BODY bgColor=3D#ffffff>
: <DIV>I would like to know what would be most appropriate method to=20
: send<BR>server-side generated GIF graphs (bar, pie, plots, curves) to =
: the=20
: browser?<BR><BR>Does there any Servlet (server side Java) product exists =
: to in=20
: the market?<BR><BR>Or would it be better to opt for client side Java =
: applets=20
: instead of GIF generation?<BR><BR>Can any one of you send relevant URLs =
: or=20
: related information source where I can find comparative evaluation of =
: existing=20
: technologies for this =
: purpose?<BR><BR>Arvind<BR><BR>&nbsp;</DIV></BODY></HTML>

: ------=_NextPart_000_0008_01BD30F6.E27C0AB0--


Robert Lynch

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

todd wrote:
>
> I'd like to know the answer to this as well. From my research it
> seems that if you try to use any of the JDK's graphic functions
> (AWT) the servlet needs to have access to an X-Server (server is
> UNIX, might be different under WINdoze). Obviously this is
> unacceptable for a server side application. I've since
> gone back to using perl for my server-side graphics work.
> Later
> Todd

Don't have much personal experience with this, but this sort of
question, need for access to a server in such an enviroment, comes up
more than occasionally. I have seen several posts in Linux forums
suggesting "dummy" servers, the ones mentioned are "Xvfb" and
"lbxproxy".

Here's part of the man page for Xvfb:
-------
...
Xvfb is an X server that can run on machines with no display hardware
and no physical input devices. It emulates a dumb framebuffer using
virtual memory.

The primary use of this server is intended to be server testing. The mfb
or cfb code for any depth can be exercised with this server without the
need for real hardware that supports the desired depths.

A secondary use is testing clients against unusual depths and screen
configurations.
...
-------
Hope it helps.

Bob L.
--
Robert Lynch-Berkeley CA USA-r...@best.com
http://www.best.com/~rmlynch/

Gallant, Michel (EXCHANGE:CAR:4A02-I)

unread,
Feb 4, 1998, 3:00:00 AM2/4/98
to

Not sure is this is relevant, but there is an article at Web Review
on Multimedia and serving Gifs (albeit using the native GIFEncoder)
at: http://webreview.com/97/11/14/webdev/
Along similar lines, I have wrapped up GIFEncoder in a java applet
for transparency selection at:
http://204.191.213.20/~mig/transpmig/

-- Mitch Gallant


todd wrote:

> I'd like to know the answer to this as well. From my research it
> seems that if you try to use any of the JDK's graphic functions
> (AWT) the servlet needs to have access to an X-Server (server is
> UNIX, might be different under WINdoze). Obviously this is
> unacceptable for a server side application. I've since
> gone back to using perl for my server-side graphics work.
> Later
> Todd
>

> Arvind (arv...@cyberspace.org) wrote:
> : I would like to know what would be most appropriate method to send
> : server-side generated GIF graphs (bar, pie, plots, curves) to the =
> : browser?
>
> : Does there any Servlet (server side Java) product exists to in the =
> : market?
>
> : Or would it be better to opt for client side Java applets instead of GIF =
> : generation?
>
> : Can any one of you send relevant URLs or related information source =
> : where I can find comparative evaluation of existing technologies for =
> : this purpose?
>

--
Michel Gallant m...@nortel.ca
ESN 393-2624 http://47.80.6.121/

todd

unread,
Feb 5, 1998, 3:00:00 AM2/5/98
to

I've tried to get java to work Xvfb and it kept barfing
out about 200 lines of traceback core dumps. As I was
"under the gun" on this project I had to abandon doing
this with java. Also it seems extremely goofy to have
to run an Xserver just to manipulate images (not display).
Even a "light-weight" xserver like Xvfb ate up almost
8 megs of memory (and Bog knows how much CPU). Rather
excessive for a headless web server. Maybe someone with
an abundance of free time (and a heart of gold) will port
(and make available) a version of Thomas Boutell's gd library.
Later
Todd

Robert Lynch (rml...@best.com) wrote:

: Don't have much personal experience with this, but this sort of


: question, need for access to a server in such an enviroment, comes up
: more than occasionally. I have seen several posts in Linux forums
: suggesting "dummy" servers, the ones mentioned are "Xvfb" and
: "lbxproxy".

: Here's part of the man page for Xvfb:
: -------
: ...
: Xvfb is an X server that can run on machines with no display hardware
: and no physical input devices. It emulates a dumb framebuffer using
: virtual memory.

: The primary use of this server is intended to be server testing. The mfb
: or cfb code for any depth can be exercised with this server without the
: need for real hardware that supports the desired depths.

: A secondary use is testing clients against unusual depths and screen
: configurations.
: ...
: -------
: Hope it helps.

: Bob L.
: --
: Robert Lynch-Berkeley CA USA-r...@best.com
: http://www.best.com/~rmlynch/

Robert Lynch

unread,
Feb 6, 1998, 3:00:00 AM2/6/98
to

Hiya-

I worked a little on this problem 'cause it interested me. Seems to me,
since I found the dummy server works in an ordinary context, should be
able to made to work in a server context. Here's what I did:

1) I have this a simple applet I wrote recently to help someone posting
with the question "how do I tell if an image has been updated?" So, I
quit X and in an ordinary Linux virtual terminal, I invoke the
appletviewer/applet as:

appletviewer id.html > tmp2 2>&1

Here's the output sent to tmp2 (which says, essentially, "help, no X!"):
-------
[user@ravel scratch]$ more tmp2
_X11TransSocketUNIXConnect: Can't connect: errno = 111
java.lang.InternalError: Can't connect to X11 window server using ':0.0'
as the
value of the DISPLAY variable.
at sun.awt.motif.MToolkit.<init>(MToolkit.java:41)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:199)
at java.awt.Window.getToolkit(Window.java:163)
at java.awt.Frame.addNotify(Frame.java:90)
at java.awt.Window.pack(Window.java:97)
at sun.applet.AppletViewer.<init>(AppletViewer.java:175)
at
sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.jav
a:77)
at sun.applet.AppletViewer.parse(AppletViewer.java:767)
at sun.applet.AppletViewer.parse(AppletViewer.java:752)
at sun.applet.AppletViewer.main(AppletViewer.java:891)
--------
2) Then I kill the appletviewer and start the Xvfb server as follows:

Xvfb -screen 0 1280x1024x8 &

and invoke the appletviewer again:

appletviewer id.html > tmp 2>&1

Here is what is sent to tmp (says, "Hey, I have X I'm happy to
report!"):
---------
[user@ravel scratch]$ more tmp
uc is:
sun.net.www.protocol.file.FileURLConnection:file:/home/user/public_html/j
ava/puz-02/scratch/test.gif
last modified: Thu Jan 01 00:00:00 1970
----------
This is the usual, expected output one would get at the command line in
an X session...

So, seems the Xvfb server can do the job when X is not available.

FWIW.

Bob L.
--
Robert Lynch-Berkeley CA USA-r...@best.com
http://www.best.com/~rmlynch/

--

0 new messages