Replace object with the bean to determine.
<c:set var="object" value="${product}" />
Display all declared fields and their values.
<c:if test="${not empty object['class'].declaredFields}">
<h2>Declared fields <em>${object.name}</em></h2>
<ul>
<c:forEach var="field" items="${object['class'].declaredFields}">
<c:catch><li><span style="font-weight: bold">
${field.name}: </span>${object[field.name]}</li>
</c:catch>
</c:forEach>
</ul>
</c:if>
Display all declared methods.
<c:if test="${not empty object['class'].declaredMethods}">
<h2>Declared methods<em><% object.getName() %></em></h2>
<ul>
<c:forEach var="method" items="${object['class'].declaredMethods}">
<c:catch><li>${method.name}</li></c:catch>
</c:forEach>
</ul>
</c:if>