-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
It sounds like you used the code straight from the book. The value of
"somehost:0" needs to be modified to drwho:0 for the example code to work in
your scenario. Furthermore, there are various checks you can do to ensure
the drwho is going to allow you to connect and use it's display.
First, you might want to run xhost + on the drwho machine, to ensure that
clients can connect. Then try setting your DISPLAY env on the client
(webserver) by hand and run an X11 app (like 'xv') and it should display on
drwho. If these steps succeed you can focus on configuration issues from
within your properties file or script.
good luck.
-mdf
>-----Original Message-----
>From: anton [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 25, 1999 11:36 AM
>To: [EMAIL PROTECTED]
>Subject: X11 and image generation using java.awt
>
>
>-----------------------------
>Please read the FAQ!
><http://java.apache.org/faq/>
>-----------------------------
>
>i am trying to run the example 6.1 from the hunter's book (o'reilly)
>that generates the image using java.awt and then encodes it into gif
>using Acme's GifEncoder.
>
>as hunter mentioned in his book, for unix clients "the frame has to be
>created inside of X11 server and the webserver has to be granted access
>to X server"
>
>when i run the code from the example, i get the error message about the
>servlet engine failing to connect to X server. something along
>the lines
>of "ajp11: Servlet Error: java.lang.InternalError: Can't connect to X11
>window server using 'somehost:0' as the value of the DISPLAY variable."
>
>could someone share the steps to set up X and jserv to make the script
>work.
>
>i am using apache 1.3.6 w/ jserv linked as dso running on red hat 5.2
>with jdk 1.7 and jserv 1.0
>
>i have tried both starting the jserv engine with a script (as someone
>mentioned in faq; ApJServManual was set to on):
>
>-----------------------
>#!/bin/sh
># launch jserv in manual mode
>jsdk=/usr/local/java/jsdk/lib/jsdk.jar
>jserv=/usr/local/java/jserv/lib/ApacheJServ.jar
>props=/usr/local/apache/conf/jserv.properties
>log=/usr/local/apache/logs/jserv.log
>classes=$jsdk:$jserv:/usr/local/java/jdk/lib/classes.zip:/usr/l
>ocal/java/lib/Acme.jar
>
>DISPLAY=drwho:0
>export DISPLAY
>
>#THREADS_FLAG=native
>#export THREADS_FLAG
>/usr/local/java/jdk/bin/java -classpath $classes
>org.apache.jserv.JServ
>$props &> $log
>---------------------------
>
>[once again - what should the value of display variable be (same as
>HOSTNAME?)]
>
>also i have tried to start jserv together with apache (ApJServManual
>Off) and i have tried to set
> wrapper.env=DISPLAY=drwho:0
>to set environmental variables together with
> wrapper.env.copyall=true
>
>the results were the same.
>
>thanks
>
>=anton=
>
>
>--
>--------------------------------------------------------------
>Please read the FAQ! <http://java.apache.org/faq/>
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Archives and Other: <http://java.apache.org/main/mail.html>
>Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]