Take the 2-minute tour ×

How to check if property ${foo} has been set?

Bonus question: how to escape $ sign in <echo> so I could output ${foo} string (not the foo variable substitution)?

PS: tried to google and read documentation, but couldn't find the answers. It's likely I'm missing something

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

You need to place an isset element inside the if element.

    <isset property="foo" />

The manual is available here.

share|improve this answer
add comment

Your Answer


