commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ying lcs" <>
Subject how to use XML Configuration of Jakarta Commons in a servlet?
Date Sun, 12 Aug 2007 06:56:51 GMT

I am trying to use XMLConfiguration in my servlet like this:

try {
			xmlconfig = new XMLConfiguration("config.xml");
		} catch (ConfigurationException  e) {
			// TODO Auto-generated catch block

But it can't load the file 'config.xml'. Can you please tell me where
should I put the config.xml file so that it can load it?

org.apache.commons.configuration.ConfigurationException: Cannot locate
configuration source config.xml
	at org.apache.commons.configuration.AbstractFileConfiguration.load(
	at org.apache.commons.configuration.AbstractFileConfiguration.load(
	at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(
	at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.<init>(
	at org.apache.commons.configuration.XMLConfiguration.<init>(
	at  com.mytest.myservlet.ServletConfig.<clinit>(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message