hashmap - how to show map object data on jsp file using spring mvc -


@modelattribute(value = "tempmap")     public map<integer, string> getetypemap(httpservletrequest request)             throws employeebusinessexception {         map<integer, string> tempmap = employeebs                 .fetchemployeementtype(userdetails.gettenantid(), userdetails.getlocaleid());         return tempmap;     } 

here have tempmap ie hashmap type of object, problem want use oblect in jsp file using springmvc framework.

use jstl foreach loop iterating map follows:

 <c:foreach var="tempmap" items="${tempmap}">    key: ${tempmap.key}  - value: ${tempmap.value}  </c:foreach> 

hope you.. use link more details jstl enabling javaserverpages standard tag library (jstl) in jsp


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -