Hi,
>From the root (open console on the box) do the following:
DISPLAY=`hostname`:0.0
export DISPLAY
/usr/openwin/bin/xhost -
/usr/openwin/bin/xhost +`hostname`
Verify
/usr/openwin/bin/xwininfo -all
You migh want to also check your Xserver configuration
/usr/dt/config/Xservers
Patrick Melli
Fusive.com
[EMAIL PROTECTED]
-----Original Message-----
From: Martin Schlatter [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 13, 2000 1:15 AM
To: [EMAIL PROTECTED]
Subject: AW: using java.awt.* in a servlet - "Can't connect to X11
window serv er using ':0.0'"
Hi
You need to have an X Server running on that system. But running an
X Server on a server system makes no sense, there is kind of a background
X Server called Xvfb which you should use. Hope it helps.
Martin
Open Connec AG, Zurich
> -----Urspr�ngliche Nachricht-----
> Von: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]Im Auftrag von
> Cogley, Jonathan
> Gesendet: Donnerstag, 12. Oktober 2000 18:54
> An: [EMAIL PROTECTED]
> Betreff: using java.awt.* in a servlet - "Can't connect to X11 window
> serv er using ':0.0'"
>
>
> I have a servlet running in weblogic 4.51 which returns a dynamic image to
> the browser.
>
> It uses the following classes:
> com.sun.image.codec.jpeg.JPEGImageDecoder (sun classes included in jdk)
> com.sun.image.codec.jpeg.JPEGImageEncoder (sun classes included in jdk)
> java.awt.image.BufferedImage
> java.awt.Graphics
> java.awt.Image
> java.awt.Canvas
> java.awt.Font
> java.awt.FontMetrics
> java.io.OutputStream
> java.io.FileInputStream
> and sends the image stream back to the browser with the relevant jpg mime
> type,etc
>
> This works on an NT server running weblogic but fails to work on
> our Solaris
> development server.
> The error given is below. I do not open any frames or do anything that
> really requires a display
> server (e.g. X), so why the error???
>
> The line that is causing the problem within the servlet is just doing a
> simple getGraphics():
> line 59: GEACTempCard
> java.awt.Graphics gTemplate = biTemplate.getGraphics();
>
> Am I missing some awt classes in my Sun JVM ??
>
> Any help appreciated!
> Jonathan
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++
> ERROR MESSAGE FROM WEBLOGIC LOG FILE
> +++++++++++++++++++++++++++++++++++++++++++++++++
>
> Thu Oct 12 07:07:46 EDT 2000:<E> <HTTP> java.lang.InternalError: Can't
> connect to X11 window server using ':0.0' as the value of the DISPLAY
> variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at <Unloaded Method>
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:125)
> at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsE
> nvironment
> .java:63)
> at
> java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1009)
> at
> java.awt.image.BufferedImage.getGraphics(BufferedImage.java:998)
> at
> com.ibm.gianteagle.servlets.GEACTempCard.doGet(GEACTempCard.java:59)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html