🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1407

Re: A servlet on a Unix machine - DISPLAY problem.

#1407
From: Joi Ellis [TeamB]
Date: Thu, 03 Jan 2002 16:27
30 lines
2390 bytes
Hanan Hermon <hananh@radcom.co.il> wrote:
> Hi,

> We are having a problem running a servlet which uses graphical classes on a
> Unix machine whenever the DISPLAY environment variable is not set to a valid
> value in the terminal which is running the web-server, even though the
> servlet is not sending the graphical components to the DISPLAY anyhow (it is
> sending it back to the browser that triggered it).

The JVM is using X11 support libraries for fonts, swing, and awt stuff.
Using anything in those packages will require an active X11 server and a 
DISPLAY variable which points to it.

> This is a very unwanted thing, since we need to run the web-server as a
> service on the Unix, and because of the above problem we cannot (instead, we
> have to login to the Unix, set the DISPLAY environment variable to a valid
> value, and only then run the web-server, and make sure the terminal we sent
> the DISPLAY to do not log-out as long as users are using the servlet).

A better solution to the problem is to run a virtual frame buffer X11
service on the web host, and alter the web-server's startup scripts to
also launch the xvfb server and set a DISPLAY variable which points to it.
This removes the dependency upon an external display device.

-- 
Joi Ellis (TeamB)               http://www.teamb.com/
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Guidelines: http://www.borland.com/newsgroups/guide.html
Only posts which violate the rules in guide.html are subject to cancelation.
Technical Details
Message-ID: <3c34868c_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail
References: <3c34150b_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,62cfd8a8b49d5a75
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-01-03 08:32:36 PST
Sender: Joi Ellis <joi@artoo.gyles19.visi.com>
Message-ID: <3c34868c_1@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: A servlet on a Unix machine - DISPLAY problem.
Newsgroups: borland.public.jbuilder.java.api
References: <3c34150b_1@dnews>
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.19-6.2.7 (i686))
NNTP-Posting-Host: 209.98.6.107
Date: 3 Jan 2002 08:27:57 -0800
X-Trace: dnews 1010075277 209.98.6.107 (3 Jan 2002 08:27:57 -0800)
Lines: 30
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail