tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gurumoorthy" <g.raghupa...@btinternet.com>
Subject Re: Setting an environment variable in tomcat 5.5 service?
Date Thu, 12 May 2005 05:59:46 GMT
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" <MKhumri@allegromedical.com>
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:Lutz.Zetzsche@sea-rescue.de]
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


----------------------------------------------------------------------------
--------------
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Mime
View raw message