How to select the first element of a set with JSTL?
- by Sergio del Amo
I managed to do it with the next code but there must be an easier way.
<%@ 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}"…