Since this is a servlet, I presume it is running on a server.  It is very
likely that X11 is not running on the server.  Even if it is, any decently
configured HTTP server will not execute servlets as a regular user, but
some special user like nobody.  In that case, even if the AWT system
knew the right display (:0.0) it would not be allowed to connect to it.
It does seem like Sun made a design error if you need to initialize AWT
in order to read an image's hight and width.  You might be tempted to use
xhost to allow all users access to the local X11 console, but I would not
recommend that !  Other alternatives include using JNI or invoking a 
program that will print the size of the image (very inefficient, but I
I guess you could cache the results).  You could also look for third
party native libraries that allow you to access meta-info about popular
image type (gif, pgn, jpg, ...)

Alexander

On Sat, Nov 11, 2000 at 09:07:00AM +0100, Fustini (proxys) wrote:
> Hi,
> I have some problem with Linux RH 6.2 + JRun 3.0+ JDK 1.2.2 SUN.
> When i use getToolkit() method in a servlet a error appears  : DISPLAY
> value  :0.0 X11 Server not responding.
> I Have to know the width and the height of Image in my Webserver.
> I installed Jbuilder 4 and when I use it with the getToolkit() function
> It works very fine !!!
> I configured all X function and my X Desktop works very fine, my DISPLAY
> variabile is set to :0. and what else ?????
> 
> Thanks a lot for all functions

Content-Description: Card for Fustini (proxys)


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to