Is it possible to check if an attribute has been added to the model?
//in the controller teh variable is not always added
//
model.addAttribute("variable", myVariable);
and in the jsp something like this
<c:choose>
<c:when test="${variable is present}">
Not present
</c:when>
<c:otherwise>
Present
</c:otherwise>
</c:choose>
Thanks
JSTL/EL cannot check if an attribute has been added to the model. For that you need to implement an observer/observable yourself.
EL can however check if a bean property or a map value is not null or empty.
See also: