Mar 15, 2018

Use a property-file with GlassFish application server

Place your property files in the <glassfish-install-dir>/glassfish/domains/<domain-name>/lib/classes directory and they will be accessible from within your applications via the ResourceBundle class. For example, add a property file named settings.properties to this directory and then access values from the file like this:
ResourceBundle.getBundle("settings").getString("my-property-key");