Wednesday, 15 April 2015

java - Displaying HashMap key & value in JSP display table -



java - Displaying HashMap key & value in JSP display table -

i display key , value of hashmap in display column of display table. below code have right now. throwing jsp error saying property attribute of column not exist

<display:table name="myhashmap" id="property"> <display:column title="name" sortable="true" property="key"/> <display:column title="value" sortable="true" property="value" /> </display:table>

try code:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <c:foreach items="${map}" var="entry"> key = ${entry.key}, value = ${entry.value}<br> </c:foreach>

java jsp jstl jsp-tags displaytag

No comments:

Post a Comment