I want to show a div if only a cookie exists. And this is how I code it inside JSP file.
<c:if test="${ ! empty cookie['test_cookie']}">
//some div goes here
</c:if>
but it always shows the div. What am I doing wrong here?
Check not empty on cookie value: cookie.test_cookie.value
:
<c:if test="${not empty cookie.test_cookie.value}">