Skip to main content
December 17, 2015
解決済み

Help with Apache Velocity

  • December 17, 2015
  • 1 の返信
  • 1298 ビュー

Hi guys,

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

このトピックへの返信は締め切られました。
ベストアンサー

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!

1 の返信

回答
December 17, 2015

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!