If you need more than Chuck's suggestion, all the configuration information 
about webapps (i.e. directories where classes, files, and and documents live) 
is already available via Tomcat MBeans. This will eliminate the need for an 
environment variable and create flexibility. You can use JConsole (if you are 
using Java 5) to understand how to find your directory programmatically.
   
  hth 
   
  andy

"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote:
  > From: Saha Rabindra N [mailto:[EMAIL PROTECTED] 
> Subject: How to access webapps class path as env variable.
> 
> 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.

Don't try for the classpath; the ClassLoader.getResourceAsStream()
method should do what you want. This is discussed fairly often in this
mailing list.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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

  


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

Reply via email to