getRealPath("/") returns null
843840Jun 1 2002 — edited Dec 8 2005Hello All,
What is the standard mechanism of keeping/getting application specific configuration files ?
I used to create a directory called conf under WEB-INF and keep all my appliation related config files there.
to read them I used to do getServletContext().getRealPath("/") + "/WEB-INF/conf/config.xml"
well this worked for me quite well .. till I moved to another app server (BEA WLS 7.0) there the api getRealPath("/") returns null to me.
Now my appliaction does not work.
I want to know what is the standard way of keeping application specific config files and what is the standard way of reading them (which works accross app servers and servlet engines.)
I searched the web but could not find anything on this subject. please help.
regards,
Abhishek.
PS: I don't want to hard code my path like File fck = new File("c:\my file.hehehe");