Yes. There are three ways.
1. JAVA_OPTS you can set your JAVA_OPTS env. variable. The startup
includes this. This works, but is a little wierd since you're not really
passing Java optional startup parameteres.
2. You ~could~ use the web.xml file within your webapp, but then you have
to worry about conflicts b/w dev, staging, and live.
2. As you thought, doing it via server.xml is a better way, if you have
control over it.
You can set a context parameter.
Context
Parameter name=foo value=bar/
/Context
-Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 29, 2002 10:29 AM
To: 'Tomcat Users List'
Subject: passing environment variables to Tomcat
Hi,
I'm using Tomcat 4.0.3, we need to pass an environment variable to Tomcat.
In essence, we are trying to define the environment variable, i.e.: DEV, QA,
PROD, etc.
Currently, we do this by modifying the catalina.sh and add this to the
runtime command
-Dweb.env=$WEB_ENV \
However, can this be done by modifying the server.xml instead? I don't
believe we will have write access to catalina.sh in the future.
Thanks,
Dean
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]