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 21:15:44 GMT
Ahh, and Velocity uses getProperty()  .

Thanks for all your help on this Emmanuel, and your posts to the 
Velocity mailing list :).  You're a gentleman and a scholar!

Charlie

Emmanuel Bourg wrote:
> csanders a écrit :
>> 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} .
>
> config.getProperty() doesn't perform the interpolation, it returns the 
> raw property. You have to use config.getString() to retrieve the 
> interpolated value.
>
> 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