commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <>
Subject Re: [Configuration]: Classpath resource in composite configuration
Date Thu, 21 Feb 2008 06:59:15 GMT schrieb:
> I am using commons configuration ver. 1.2.
> I would like ot define a composite configuration in which 
> one or more items are classpath resources as in:
>   <configuration>
>       <properties fileName=""/>
>       <xml fileName="classpath:/gui.xml"/>
>   </configuration>
> Is this somehow possible? Even if the syntax above is not supported, 
> how can I accomplish the same result alternatively? That is,
> I would like to create a composite configuration in which one or more
> resources are loaded off the classpath.
> Thanks,
> /U

In recent versions of commons configuration the class path is 
automatically searched for configuration files. I am not sure whether 
this is true for 1.2. (I guess there is a reason why you have to use 
this old version.)

What probably will work is to load the configuration definition file 
itself from the class path and specify relative paths to the 
configuration files to be loaded. If the application is correctly 
packaged, the files should be found.

There is also some information available at [1].



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

View raw message