[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: placing the properties file in tomcat



Couple of methods. 
1. Use 
ResourceBundle rBundle = ResourceBundle.getBundle("<your property file name>");
rBundle.getString("<Your property name>");

2. Use:
init parameters within your web.xml and use it. (Struts applications are 
classic examples) 

I remember some examples within the samples given under tomcat. Check it out. 

HTH...

Thanks, 
--Kamesh Challa
Yash Technologies Inc.


Quoting Poorav Chaudhari <pooravc@yahoo.com>:

> For my web application, i have created a properties file. It is placed in
> the
> WEB-INF/classes folder. to test the properties file i also created a small
> command line program. that worked fine, i was able to print the values of
> properties. but when i run the web app on tomcat, i get an error saying
> that
> the properties file cannot be found. what am i missing. 
> 
> Thank you in advance.
> 
> 
> =====
> Poorav Chaudhari
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://platinum.yahoo.com
>