Thank you *very* much, Shaoping!  Exactly what I was looking for--a clean
fix and all the info I needed to implement it right off.

And much to my relief, I might add.  I came to work this morning thinking I
was going to have to patch JServ to pass on DISPLAY.  Or put it off and, in
the meantime, do my work on a NT box with IIS and JRun.  Not only is it NT,
but JRun is requiring me to restart the service manager service each time I
change the servlet. (I know that's not how it's supposed to work, but
that's what it's doing!)

Now if only Netscape obeyed the "Expires" header I'm adding the way IE
does.  **Despite** the fact that I can *see* the data stream sending
**different** data, Netscape redisplays the old image until I hit 'Reload';
IE does it with just a <Return> in the Address block.

Shaoping Zhou wrote:

>I had the same problem earlier.  I guess that the root of the problem is that,
>if you autostart JServ from Apache, then env var DISPLAY will not be handed to
>the process in which "java ...." runs.  What I did is to manually start JServ
>with the following script:
>
>#!/bin/sh
># launch jserv in manual mode
>jsdk=/path/to/jsdk.jar
>jserv=/path/to/Apache-JServ.jar
>props=/path/to/jserv.properties
>log=/path/to/jserv.log
>classes=$CLASSPATH:$jsdk:$jserv
>
>DISPLAY=yourHostName:0
>export DISPLAY
>
>THREADS_FLAG=native
>export THREADS_FLAG
>/path/to/java  -Xms60m -Xmx120m  -classpath $classes org.apache.jserv.JServ
>$props &> $log
>
>Hope it can be of help. I guess that there might be some tricks that you can
>try to let Apache server hand the DISPLAY env to java in autostart mode,
>but in
>my case I just want to write the useful code and my production and development
>environment also works more flexible with manual start option.
>
>regards,
>
>-Shaoping
>
>Thad Humphries wrote:
>
>> I'm running JServ 1.0b3 with Apache 1.3.4 on a Sun 2.6 server.
>>
>> I'm trying the image generation examples in Jason Hunter's book,
>> specifically Example 6-1, HelloWorldGraphics.java.  This servlet uses AWT
>> and Hunter warns that you should either unset or set DISPLAY.   I have set
>> my DISPLAY to :0.0, exported DISPLAY, ran xhosts +, and restarted Apache.
>> But when I run my servlet, I get an internal server error and this in my
>> jserv.log:
>>
>> [23/03/1999 13:21:37:735] (ERROR) ajp11: Servlet Error:
>> java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
>> the value of the DISPLAY variable.: Can't connect to X11 window server
>> using ':0.0' as the value of the DISPLAY variable.
>> [23/03/1999 13:21:37:736] (ERROR) an error returned handling request via
>> protocol "ajpv11"
>>
>> I get the same response when I unset DISPLAY.
>>
>> So, who out there has done this?  How do I successfully set DISPLAY such
>> that JServ can see it?

--------------------------------------------------------------------------
Thad Humphries                       "'Open Systems' means no fences. And
Software Engineer (aka, Nerd)          no fences means no need for Gates."
Phone: 540/675-3015, ext. 225                           - Sun Microsystems




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to