You cant use System.env ... you have to use JNDI to to get the variable
names
Search google ... with words JNDI variables tomcat ...

Something like this ...

Context initialContext = new InitialContext();
String value = initialContext.lookup("java:env/" + VAR_NAME ) ;

Regards
Guru
----- Original Message -----
From: "Mufaddal Khumri" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, May 11, 2005 10:31 PM
Subject: RE: Setting an environment variable in tomcat 5.5 service?


Yes, I did.

-----Original Message-----
From: Lutz Zetzsche [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 11, 2005 2:16 PM
To: Tomcat Users List
Subject: Re: Setting an environment variable in tomcat 5.5 service?

Am Mittwoch, 11. Mai 2005 18:26 schrieb Mufaddal Khumri:
> Thank you for the reply. I am trying to set in web.xml using:
>
>   <env-entry>
>     <env-entry-name>MY_ENV_VAR</env-entry-name>
>     <env-entry-value>C:/config/one.xml</env-entry-value>
>     <env-entry-type>java.lang.String</env-entry-type>
>   </env-entry>
>
> I am placing this right above the </web-app> ending tag.

[...]

> Any clues as to why my <env-entry> is not taking effect?

Did you restart Tomcat?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


----------------------------------------------------------------------------
--------------
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity
to whom they are addressed. If you have received this
email in error please notify the system manager. Please
note that any views or opinions presented in this email
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
----------------------------------------------------------------------------
--------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to