You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Dishara Wijewardana <dd...@gmail.com> on 2012/06/09 19:03:21 UTC
Need a clarification in VelocityEngine initialization
Hi all,
I just want to verify this as this is a bit confusing to me.
Suppose I want to construct a velocity engine with some properties. Typical
way to do this in velocity is
VelocityEngine ve = new VelocityEngine();
ve.init(property_file_name)
Why velocity have both the constructors as well as init overridden.
Hence as I feel, above is same as
VelocityEngine ve = new VelocityEngine(property_file_name);
ve.init();
Please correct me if I am wrong.
-
Thanks
/Dishara
Re: Need a clarification in VelocityEngine initialization
Posted by Claude Brisson <cl...@renegat.net>.
Yes, it does the same.
But one could do:
VelocityEngine ve = new VelocityEngine(defaultProperties);
in one place, and:
ve.init(instanceProperties)
in another.
Claude
On Sat, 9 Jun 2012 22:33:21 +0530
Dishara Wijewardana <dd...@gmail.com> wrote:
> Hi all,
> I just want to verify this as this is a bit confusing to me.
>
> Suppose I want to construct a velocity engine with some properties.
> Typical way to do this in velocity is
>
> VelocityEngine ve = new VelocityEngine();
> ve.init(property_file_name)
>
> Why velocity have both the constructors as well as init overridden.
>
> Hence as I feel, above is same as
>
> VelocityEngine ve = new VelocityEngine(property_file_name);
> ve.init();
>
> Please correct me if I am wrong.
>
> -
> Thanks
> /Dishara
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org