Is that possible to a property file other than web-inf/classes folder?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tombee_K
Posted On:   Thursday, December 19, 2002 10:49 PM

Can I have a property in the following folder structure?

ApplicationName

    jsp

        config/MyProperties.properties

    web-inf

        classes

            Test.java



Can my java file residing in the classes/Test.java read the property file in jsp/config/MyProperties.properties

Will the same thing be applicable for a an Application other than web-application.

Re: Is that possible to a property file other than web-inf/classes folder?

Posted By:   Ivo_Limmen  
Posted On:   Friday, December 20, 2002 12:09 AM

It's also possible to add a directory containing the property file in the classpath. When you look for the property file (using the ResourceBundle) it will find your property file on the classpath.

Re: Is that possible to a property file other than web-inf/classes folder?

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, December 19, 2002 11:43 PM

Hi,

yes, you can. The only problem is that you have to provide the location of the properties files or hardcoded in the code (bad practice) or in the web application descriptor.
About | Sitemap | Contact