tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Software AG <...@stark-verlag.de>
Subject AW: how to set environment variable in tomcat?
Date Tue, 25 Jun 2002 08:39:33 GMT
The getenv() method is deprecated, it might be no longer there in future
versions of the JDK.

I'd recommend to change the startup script for Tomcat to copy all
environment variables into system properties, maybe with a prefix (like
os.env).

Another approach (almost platform neutral) might be to use Runtime.exec() to
call a script that issues the set command without parameters. All platforms
I know will then list the environment onto stdout, which might be redirected
and parsed by Java.

Hiran

> -----Urspr√ľngliche Nachricht-----
> Von: Ralph Einfeldt [mailto:ralph.einfeldt@uptime-isc.de]
> Gesendet: Dienstag, 25. Juni 2002 10:31
> An: Tomcat Users List
> Betreff: AW: how to set environment variable in tomcat?
> 
> 
> 
> getenv() and getProperty():
> http://java.sun.com/j2se/1.4/docs/api/java/lang/System.html#ge
> tenv(java.
> lang.String)
> http://java.sun.com/j2se/1.4/docs/api/java/lang/System.html#ge
tProperty(
java.lang.String)

Have a look at the startup scripts for tomcat for you platform.

> -----Urspr√ľngliche Nachricht-----
> Von: Johnny [mailto:keongwh@mimos.my]
> Gesendet: Dienstag, 25. Juni 2002 10:14
> An: Tomcat Users List
> Betreff: how to set environment variable in tomcat?
> 
>  Where can I find more detail guideline info about the startscript for
> tomcat, and API doc of System.getenv()?
> 
>  Actually, I'm trying to set my own defined environment variable -
> SSL_CLIENT_CERT in my jsp application. So that the 
> application can retrieve the certificate info from the smart card. 
> Can I just use <context-param>'s in web.xml. Which solution is
> much better?
> 

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message