I am trying to use a ForEach loop to iterate through my JSON array passed over from the controller and create a html element for each item in the array. However when i try to run my code, an exception occurred but the browser did not specify where exactly is that error.
<c:forEach var = "i" begin = "0" end = '${notifications.length-1}'>
Item <c:out value = "${i}"/><p>
</c:forEach>
Eventually, I want to create a
element for each item in the loop:
<c:set var = "temp" value = "${notifications}"/>
<c:set var = "string1" value = "${fn:substring(temp, 0, 16)}" />
<p class="alert alert-info" data-toggle="tooltip" title='${notifications}'><strong>Info!</strong> ${string1 }...</p>
I am new to JSTL so I am not sure about the format. Would anyone be able to tell me what went wrong with my code ?