Ideally, You should be able to put anywhere in the server. Only thing is you have to configure the proper location on your project.
Properties prop = new Properties();
InputStream in = getClass().getResourceAsStream("foo.properties");
Or if you plan to read from Classpath, Put it in WEB-INFclasses folder. Thats the right place. I dont think bin is correct location.
Reading properties from a file is not a portable way and violate the spec (you should not use java.io.*).
You might use the WEB-INF/classes folder as shakirpm4u describe other option in AS7 is to set it as system-property within the configuration.
Thank you, Shakir.
Thank you, Wolf-Dieter.
Nice very helpful
i put my properties files in a custom module. So i have to reference it in the MANTIFEST.MF file with the Dependencies attribute. When i want to read the file i have to load it like this:
Properties props = new Properties();
The advantage to put properties file in modules section. You do not have to change the properties everytime you deploy to your productiv system, if you have differences between developing and productiv systems.