atom feed4 messages in org.apache.tomcat.usersRe: Setting up an environment variabl...
FromSent OnAttachments
John MattosOct 31, 2002 11:36 am 
Craig R. McClanahanOct 31, 2002 11:57 am 
John MattosOct 31, 2002 12:00 pm 
Craig R. McClanahanOct 31, 2002 12:03 pm 
Subject:Re: Setting up an environment variable in Tomcat 4.1
From:John Mattos (matt@yahoo.com)
Date:Oct 31, 2002 12:00:34 pm
List:org.apache.tomcat.users

So how would I set up "indemand.env" as a system property? Also, yes, that's how
I'm gettng it in code. "Craig R. McClanahan" <crai@apache.org> wrote:

On Thu, 31 Oct 2002, John Mattos wrote:

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

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: For additional commands, e-mail:

John L. Mattos 302 East 88th Street Apt #5B New York, New York 10128-4939 (M) (917) 202-8450 (www) http://www.mattos.ws