You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Saha Rabindra N <sa...@mellon.com> on 2005/12/14 00:50:47 UTC

How to access webapps class path as env variable.

Hi,
 I am trying to access the webapps class path through some environment variable.
Can you tell me the name of the variable which holds the same.


String strDir = System.getProperty("catalina.home"); // This code gives me the home folder of tomcat.But how do I get the webapps class path ??

I have a ini file placed in my webapps class folder which I need to read at runtime. If there is no such environment variable available, then can you please tell me if there is any workaround.

Thanks for your help.

Regards,
RNS
 
The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.
If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(17b)

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


Re: How to access webapps class path as env variable.

Posted by Viorel Dragomir <vd...@wylog.com>.
Try better to put the ini into the classes folder or into your jar and use 
the getResource



Viorel Dragomir

.
..
-------------------------------------------------------------------



----- Original Message ----- 
From: "marju jalloh" <ja...@yahoo.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Wednesday, December 14, 2005 14:46
Subject: Re: How to access webapps class path as env variable.


> make an enviroment variable WEBAPPS-PATH in your profile
>  an call
>  String strDir = System.getProperty("WEBAPPS-PATH");
>
>  Hope it helps
>
>  Marju
>
> Saha Rabindra N <sa...@mellon.com> wrote:
>  Hi,
> I am trying to access the webapps class path through some environment 
> variable.
> Can you tell me the name of the variable which holds the same.
>
>
> String strDir = System.getProperty("catalina.home"); // This code gives me 
> the home folder of tomcat.But how do I get the webapps class path ??
>
> I have a ini file placed in my webapps class folder which I need to read 
> at runtime. If there is no such environment variable available, then can 
> you please tell me if there is any workaround.
>
> Thanks for your help.
>
> Regards,
> RNS
>
> The information contained in this e-mail may be confidential and is 
> intended solely for the use of the named addressee.
> Access, copying or re-use of the e-mail or any information contained 
> therein by any other person is not authorized.
> If you are not the intended recipient please notify us immediately by 
> returning the e-mail to the originator.(17b)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
> ---------------------------------
> Yahoo! Shopping
> Find Great Deals on Holiday Gifts at Yahoo! Shopping 


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


Re: How to access webapps class path as env variable.

Posted by marju jalloh <ja...@yahoo.com>.
make an enviroment variable WEBAPPS-PATH in your profile
  an call
  String strDir = System.getProperty("WEBAPPS-PATH");
   
  Hope it helps
   
  Marju

Saha Rabindra N <sa...@mellon.com> wrote:
  Hi,
I am trying to access the webapps class path through some environment variable.
Can you tell me the name of the variable which holds the same.


String strDir = System.getProperty("catalina.home"); // This code gives me the home folder of tomcat.But how do I get the webapps class path ??

I have a ini file placed in my webapps class folder which I need to read at runtime. If there is no such environment variable available, then can you please tell me if there is any workaround.

Thanks for your help.

Regards,
RNS

The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee.
Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized.
If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(17b)

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

  


			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping