tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Cheesman <>
Subject Re: Off-topic: Java CGI Programming
Date Tue, 04 Sep 2001 11:18:07 GMT
At 01:05 PM 04/09/01, you wrote:
>Sorry guys for the off topic post, but I am comparing CGI programming in
>Java vs. JSP and Servlets.
>I can't get to Marty Hall's Java CGI Programming page, and nobody replied to
>any of my posts to Java newsgroups, and I'm getting kinda desperate to know
>The System.getenv() is depreciated, and I can't use it for CGI programming
>with Java since I just get an error:
>CGI Error
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
>java.lang.Error: getenv no longer supported, use properties and -D instead:
>[from PWS running on Win98 SE]
>I looked in the properties but there is nothing there that I can see about
>environment variables. Can someone tell me how to get/set environment
>variables in Java console programs? I am compiling these programs into EXEs
>for Windows with Visual J++ and for UNIX with GCC, so they aren't being
>invoked with the JVM.

System.getProperties() / getProperty("user.home") (for example)

System.setProperty("key", "value");


                           *   Jim Cheesman   *
             Trabajo: - (34)(91) 724 9200 x 2360
                           Evil is 
not all bad.

View raw message