You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dr A.C. Marshall" <ad...@liverpool.ac.uk> on 2002/09/16 18:46:45 UTC

Graphics on a web server

Hi all,

I'm new to this list but I've been programming Java and Java servlets
for years now!

I have a question.

Part of my servlet creates a java.awt.Image and then converts it to a
gif for inclusion on a web page.

Now I'm sure everybody here is aware of the problems in using
java.awt.Image omn a web server with no graphics adaptor (I know I am).
I was told (and I'm beginning to wonder whether what I was told is
actually true or not) but I was told that under java 1.2 and upwards I
could use java.awt.BufferedImage instead of the standard Image and that
this class would not complain about the lack of (in my case) an X11
graphics adaptor.

When my code ran under jserv I had to use the PJA Toolkit written by
eeteks in place of the regular awt toolkit. Everythoing worked fine but
the servlet is a real fiddle to set up because of the PJA Stuff (and the
PJA Fonts looked awful!)

So my question is this: do I still need to use the PJA Toolkit or is
there a way of manipulating graphics in 1.4 on a machine with no
graphics adaptor?

I have also been looking into Java 1.4's headless mode - In a fit of
blind optimism I wondered whether setting the property java.awt.headless
to true would allow my program to work without the graphics adaptor -
however, it seems to make absolutely no difference whatsoever!

Adam Marshall







-- 
   Dr AC Marshall (adamm@liv.ac.uk). LUSID System Programmer,
   Centre for Lifelong Learning, University of Liverpool.

   Cheese of the Millenium: Quejo con Piri Piri

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>