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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to