0

So I want to render li in jsp but the thing is I want to render the list which is present in my js.

I will keep my question small and clear. also if this is repeated question please link the original question bcz I was unable to find it.

Here is my jsp file which has

<div id="dropDownOpns">
    <ul id="bank_id" class="payment_modes">
        <c:forEach var="item" items="${bankList}">
            <li>${item.bank}</li>
       </c:forEach>
    </ul>
    </div>

and below is the script tag which has this

<script>
  var bankList = [{"bank":"ABC","emis":[{roi:10}]},{"bank":"PQR","emis":[{roi:12.5}]}];
</script>

At the end all I'm getting is

<div id="dropDownOpns">
 <ul id="bank_id" class="payment_modes">
 </ul>
</div>

Without li items.

Sanjay Sahani
  • 398
  • 2
  • 13

0 Answers0