I am trying to access the first element of a TreeMap, I have the following HTML in a JSP file:
<c:forEach items="${subscriber.depent}" var="entry" begin="0" end="0" step="1">
<c:set var="dep" value="${entry.value}" />
</c:forEach>
This code gets me the first element of the TreeMap but this just seems like a 'hack' to me.
I have also tried:
<c:set var="dep" value="${subscriber.depent[0]}" />
But that gives me a exception:
java.lang.Integer incompatible with java.lang.Long
Any better ways of doing this?
Thanks, Randall.