tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Two questions !
Date Mon, 24 Jun 2002 17:19:25 GMT
Howdy,
Your two questions are related.  The path where tomcat is would be
$CATALINA_HOME, which is an environment variable.

>2. It is possible to  find out (in Java) the value of a system variable
>like
>%CLASSPATH% or %CATALINA_HOME% ?

There's a difference between an environment variable and a java runtime
option.  Anything passed as -Dname=value to java will be accessible via
System.getProperty("name").

Getting environment variable is different, and not always possible.  The
classpath, coincidentally, is accessible as 
System.getProperty("java.class.path").

See the JavaDoc for System.getProperties() for a complete list.  Tomcat
may add something like a jakarta.tomcat.home property, but I don't know
if it does.

Finally, although it's sometimes kludgey (sp?), you can always add a
parameter to your web.xml if you know it in advance (at deploy time,
versus run time).

Yoav Shapira
Millennium ChemInformatics

--
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