How to select the first element of a set with JSTL?
You can access individual elements with the array [] operator: <c:out value=”${attachments[0].id}” /> This will work for arrays and lists. It won’t work for maps and sets. In that case you must put the key of the element inside the brackets.