Reading Properties File using ResourceBundle
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bharath_Krishna
Posted On:   Thursday, December 19, 2002 07:15 AM

We had our application running on Tomcat We had the property file in a specific folder , precisely TOMCATHOMEAPPLICATIONNAMEconfig folder. And we have a Java class which reads this properties file. The location of the Java class is TOMCATHOMEAPPLICATIONNAMEWEB-INFclassescomfirstiscommonutilgeneral This is working without issues. But when I deploy my application in Websphere, it is not able to read the property file from the above mentioned path but we need to put the Property file in the same folder as we have the Java Class. Can anyone explain why this is happening and how to overcome this. Thanks.    More>>

We had our application running on Tomcat

We had the property file in a specific folder , precisely TOMCATHOMEAPPLICATIONNAMEconfig folder.

And we have a Java class which reads this properties file. The location of the Java class is TOMCATHOMEAPPLICATIONNAMEWEB-INFclassescomfirstiscommonutilgeneral

This is working without issues.

But when I deploy my application in Websphere, it is not able to read the property file from the above mentioned path but we need to put the Property file in the same folder as we have the Java Class.

Can anyone explain why this is happening and how to overcome this.

Thanks.

   <<Less

package for properties file Re: Reading Properties File using ResourceBundle

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, December 19, 2002 07:20 AM

For ResourceBundle, the properties filename indicates a package structure e.g. "foo.bar.baz.properties" must be found at "applicationname/WEB-INF/classes/foo/bar/baz.properties" along with the .class files in the "foo.bar" package.

About | Sitemap | Contact