| From | Sent On | Attachments |
|---|---|---|
| John Mattos | Oct 31, 2002 11:36 am | |
| Craig R. McClanahan | Oct 31, 2002 11:57 am | |
| John Mattos | Oct 31, 2002 12:00 pm | |
| Craig R. McClanahan | Oct 31, 2002 12:03 pm |
| Subject: | Re: Setting up an environment variable in Tomcat 4.1 | |
|---|---|---|
| From: | Craig R. McClanahan (crai...@apache.org) | |
| Date: | Oct 31, 2002 11:57:35 am | |
| List: | org.apache.tomcat.users | |
On Thu, 31 Oct 2002, John Mattos wrote:
Date: Thu, 31 Oct 2002 11:36:33 -0800 (PST) From: John Mattos <matt...@yahoo.com> Reply-To: Tomcat Users List <tomc...@jakarta.apache.org>, Matt...@Yahoo.com To: tomc...@jakarta.apache.org Subject: Setting up an environment variable in Tomcat 4.1
Strange.
I've set up the envieonment variable needed for my app as follows
<Environment description="Clearinghouse Environment Variable"
name="indemand.env" override="true"
type="java.lang.String"
value="c:\tomcat4.1\indemand_env_tomcat.properties"/>
I feel like that means it's set up.
When I run the app, I get the message...
indemand.env system property has not been defined
Environment variables are *not* system properties. Indeed, system properties would not be a good choice for things like this, because they are global to an entire Tomcat installation, while environment variables are specific to a webapp.
What's wrong with this picture? Am I missing something?
How are you trying to retrieve this value? You should be doing something like:
InitialContext ic = new InitialContext(); String value = (String) ic.lookup("java:comp/env/indemand.env");
John
Craig





