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/07/01 19:43:52 UTC

What are the properties required to initialize Velocity Engine

Hi all,
I was searching last couple of days on how to find what properties should
be given to VelocityEngine#init(Properties)  to initialize the velocity
engine.
But I could not find a proper place. Is there any sample to run or some
documentation to  understand this (how to initialize velocity engine) ?


-- 
Thanks
/Dishara

Re: What are the properties required to initialize Velocity Engine

Posted by Claude Brisson <cl...@renegat.net>.
Hi Dishara.

The properties file with comes with src code is the default properties
file, so it's already used, no need to give it to Velocity again. One
will need to specify custom properties each time he has custom needs,
like changing the default encoding, using another resource loader,
etc... Every property is detailed in the documentation.

Your "incorrect syntax" is a perfectly valid syntax for Velocity, it's
just that it doesn't recognize it as a comment, it will then consider
it as text to be displayed as is to the output. You need some more
effort to find an incorrect syntax that will throw an exception - but
that's not so hard.


  Claude


On Sun, 1 Jul 2012 23:28:40 +0530
Dishara Wijewardana <dd...@gmail.com> wrote:

> On Sun, Jul 1, 2012 at 11:13 PM, Dishara Wijewardana <
> ddwijewardana@gmail.com> wrote:
> 
> > Hi all,
> > I was searching last couple of days on how to find what properties
> > should be given to VelocityEngine#init(Properties)  to initialize
> > the velocity engine.
> > But I could not find a proper place. Is there any sample to run or
> > some documentation to  understand this (how to initialize velocity
> > engine) ?
> >
> 
> Hi
> I used the property file which comes with src code, under velocity
> examples module. And it ran without any exceptions.
> But even though I evaluated a script code which is a comment (i.e ##
> this is a comment) . But I gave incorrect syntax to the comment (i. e
> --- this is a comment)
> and it still returns true .Not sure why.
> 
> 
> >
> >
> > --
> > Thanks
> > /Dishara
> >
> >
> 
> 


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


Re: What are the properties required to initialize Velocity Engine

Posted by Dishara Wijewardana <dd...@gmail.com>.
On Sun, Jul 1, 2012 at 11:13 PM, Dishara Wijewardana <
ddwijewardana@gmail.com> wrote:

> Hi all,
> I was searching last couple of days on how to find what properties should
> be given to VelocityEngine#init(Properties)  to initialize the velocity
> engine.
> But I could not find a proper place. Is there any sample to run or some
> documentation to  understand this (how to initialize velocity engine) ?
>

Hi
I used the property file which comes with src code, under velocity examples
module. And it ran without any exceptions.
But even though I evaluated a script code which is a comment (i.e ## this
is a comment) . But I gave incorrect syntax to the comment (i. e --- this
is a comment)
and it still returns true .Not sure why.


>
>
> --
> Thanks
> /Dishara
>
>


-- 
Thanks
/Dishara