I am creating two applications that use the XMLC configuration configuration commons-configuration. Since the applications are related to each other, I created another project called commons, which has a custom configuration manager that initializes XMLConfiguration as follows:
config = new XMLConfiguration("conf/config.xml");
What happens is that the command-line application works fine by loading the configuration file. But when I try to use my own configuration manager in webapp (using Tomcat), I get
org.apache.commons.configuration.ConfigurationException: cannot find configuration source
I put the conf directory in the WEB-INF folder, the root folder and the META-INF folder. I also tried with "/conf/config.xml", "./conf/config.xml"and "../conf/config.xml".
The only time I got this to work - in a web application - was using the absolute path.
What am I missing?
Thanks Bruno
source
share