On Thu, 31 Oct 2002, John Mattos wrote:

> Date: Thu, 31 Oct 2002 11:36:33 -0800 (PST)
> From: John Mattos <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> 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


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

Reply via email to