I’ve got a PersistenceSet and would like to check if it contains a certain variable.
How can I check in the JSTL whether subitem exists or not?
However when I try to access a non-existant variable like this:
<c:if test="${not empty item.subitem}">
<c:out value="${item.subitem}" /><br />
</c:if>
I get a PropertyNotFoundException:
Property ‘subitem’ not found on type com.company.classname
It is clear that standard setter/getter is not available for
subitemin the classIf you want to check if the property is available for the class you can go for following tweak
using
c:catch