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" <[EMAIL PROTECTED]> 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 ,
> [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
>
> >
> 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
---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now