getting properties file outside jar?
hi all,
when i deploy my ear file in Sun AS 8.1, the current directory points to domains/domain1/config/
In the coding, i couldnt be able to get the properties file. i dont want to put the properties file in the jar. because I need the properties file to be editiable by the end user.
Any suggestion?
thank you,
# 1
If it's a web application, you can also put it in WEB-INF/classes. There are also a few interesting system properties in SJSAS, like com.sun.aas.instanceRoot, which points to the root dir of your instance, e.g. /var/appserver/nodeagents/hostname/your-instance. You could use that to build the path to your properties file.
One little thing to remember: the config dir of the instance gets synchronized with the config dir for the domain in initialization.