Search code examples
javajspjstl

set boolean value into variable using JSTL tags?


I am using JSTL tags. i have below code.

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

Now variable refreshSent has boolean value or String?

Thanks!


Solution

  • 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.