I am reading properties file from java DAO implementation for loading properties object as in code given below
this.getErrorproperties().load(
new FileInputStream(new File("").getAbsolutePath()
+ "/conf/error/error.properties"));
While testing it works fine but when i try to deploy application on jboss 5 server. application deployment fails because absolute path is considered to be bin directory of jboss.
I want Jboss to find it relative to path of ear file. One more problem i face is my path relative to home path of project or ear file will be different for first and later.
Please suggest current approach programmers follow for such scenario. (I am a fresher)