How to convert int value into string on jsp page
jsp
Solution
You could set it to another variable using `c:set`, which should do implicit String conversion for you:
<c:forEach var="schoolDetails" items="${schoolCodeIdMap}">
<c:set var="detailValue">${schoolDetails.value}</c:set>
<c:set var="smsStatsCalendar" value="${smsStats.get(detailValue)}"/>
<c:foreach>
The body of a `c:set` tag will always be interpretted as plain text, and so get converted to a `String` variable by the tag. This is in contrast to using:
<c:set var="detailValue" value="${schoolDetails.value}"/>
which would maintain the property type as an integer.
Problem
I have a map that contains Map , which i iterate it on jsp page using ``` <c:forEach var="schoolDetails" items="${schoolCodeIdMap}"> //below i am getting value from another map which contains String as a key. <c:set var="smsStatsCalendar" value="${smsStats.get(schoolDetails.value)}"></c:set> <c:foreach> ``` In above code smsStats contains String as key and I am passing Integer Value to get object. How can i convert That schoolDetails.value (int) value into string to get object.