Pude hacerlo con el siguiente código, pero debe haber una manera más fácil.¿Cómo seleccionar el primer elemento de un conjunto con JSTL?
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:if test="${fn:length(attachments) > 0}">
<c:forEach var="attachment" items="${attachments}" varStatus="loopCount">
<c:if test="${loopCount.count eq 1}">
attachment.id
</c:if>
</c:forEach>
</c:if>
la solución como c: fuera de uso no funcionó Obtuve el siguiente error 'javax.el.PropertyNotFoundException: Propiedad '0' no encontrada en el tipo org.hibernate.collection.PersistentSet' He utilizado su código r arriba desde la mañana usando hibernate como este 'someobject.getSetofsomeObjects()' en el parámetro de solicitud – shareef