2009-11-12 87 views
0

正如我在一些例子中看到的,並試圖在整個velocity site瞭解,有三種方式初始化velocityengine的:
- 使用默認配置:)的.init(
- 使用默認配置,加上一個文件的屬性:的.init(串)
- 使用默認配置,再加上一個集合中的屬性:的.init(Commons.Collections.ExtendedProperties)

但我發現這些工作如何的一點解釋。每例如,在應用程序我已經下載:如何正確初始化nvelocity引擎?

VelocityEngine engine = new VelocityEngine(); 
ExtendedProperties props = new ExtendedProperties(); 
props.AddProperty("file.resource.loader.path", new ArrayList(new string[] { ".", @".\Templates" })); 
engine.Init(props); 

除了顯而易見的前提,什麼是「file.resource.loader.path」?
我可以更改哪些其他屬性,以及如何更改它們(我的意思是,使用addproperty,或者如果有其他方式,請指定)?

回答