2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

How to check not null condition in Freemarker

I have requirement like, i have variable for e.g.


TEST -> variable


It may exist in request or session scope, or may not be exist.

Now i want to check if variable exist or not, How to do this?

userimage

Freemarker do not understand null, so what you need to do is, for checking if variable exist of not try below code:


<#if TEST??></#if>

Answer is