set boolean value into variable using JSTL tags?

user1016403 picture user1016403 · Sep 20, 2012 · Viewed 72.8k times · Source

I am using JSTL tags. i have below code.

<c:set var="refreshSent" value="false"/>

Now variable refreshSent has boolean value or String?

Thanks!

Answer

Chris picture Chris · Sep 20, 2012

It is going to be a boolean. You can check it by comparing in a

<c:if test="${refreshSent eq false}">

and

<c:if test="${refreshSent eq 'false'}">

The second is a string comparison.