commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From csanders <csand...@hoovers.com>
Subject Re: First post, ExtendedProperties question
Date Wed, 14 May 2008 19:47:57 GMT
Yep, here is the code:

            CompositeConfiguration config = new CompositeConfiguration();
            config.addConfiguration(new SystemConfiguration());
            config.addConfiguration(new EnvironmentConfiguration());
            config.addConfiguration(new 
PropertiesConfiguration(Config.velocity_properties_file));
           
            
System.out.println(config.getProperty("file.resource.loader.path") );
            System.out.println(config.getProperty("TEMPLATE_HOME") );

            ExtendedProperties configuration = 
ConfigurationConverter.getExtendedProperties(config);

TEMPLATE_HOME is the env var, and the getProperty() does expand it, but 
the file.resource.loader.path just returns ${TEMPLATE_HOME} .

Thanks,
Charlie

Emmanuel Bourg wrote:
> csanders a écrit :
>> I'm having a little trouble getting the interpolation to work, I have 
>> a properties file with contents  similar to:
>>
>> ---
>> file.resource.loader.path = ${VELOCITY_TEMPLATE_HOME}
>> ---
>>
>> Where VELOCITY_TEMPLATE_HOME is an environmental variable that I need 
>> to get expanded , how would I do this ?
>
>
> Did you try the composite configuration example I gave in my previous 
> message ?
>
> Emmanuel Bourg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message