java - How to access values of AbstractMap.SimpleEntry in JSP? -
for example, have
list<simpleentry<string, string>> mypairlist = new arraylist<simpleentry<string, string>>();
how access entries (the key , value) through
<c:foreach items="${mylist }" var="mypair"> <c:set var="key" value="????????" /> <c:set var="value" value="????????" /> </c:foreach>
what the javadoc class simpleentry? has getkey()
getter, , getvalue()
getter.
how access property (i.e. getter) jsp el? obj.propertyname
so need
<c:set var="key" value="${mypair.key}" /> <c:set var="value" value="${mypair.value}" />
Comments
Post a Comment