I think you can also do something like this: #if($car && $car == "")
That is, if $car is defined and has no value (ie, null) ----- Original Message ----- From: Shinobu Kawai To: Velocity Users List Sent: Thursday, December 02, 2004 10:56 AM Subject: Re: null in velocity Hi SUBBIAH, > How to check for null in velocity > for eg. I load a class in the context Class:: car > > #if ($car.getFuel() = null ?? ) You can use NullTool http://wiki.apache.org/jakarta-velocity/NullTool #if ($null.isNull($car.fuel)) Best regards, -- Shinobu Kawai -- Shinobu Kawai <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]