SOLVED

Help with Apache Velocity

Go to solution
Anonymous
Not applicable

Help with Apache Velocity

Hi guys,

Does anyone have any clue why the scenario described in screenshot happens?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Help with Apache Velocity

Found the problem:

to check for null in velocity, dont use

${variable} == ''

this wont work either

${variable} == 'null'

or any combination of quotes and what have you. What does work is a simple if:

#if ($variable)

... do stuff here if the variable is not null

#end

Cheers!

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Re: Help with Apache Velocity

Found the problem:

to check for null in velocity, dont use

${variable} == ''

this wont work either

${variable} == 'null'

or any combination of quotes and what have you. What does work is a simple if:

#if ($variable)

... do stuff here if the variable is not null

#end

Cheers!