abhishek
abhishek

Reputation: 149

how to iterate using jstl code

This is my code

<c:set var="radioCount" scope="session" value="${radiocount}"/>

I want to create a table with no of rows equal to radiocount so trying to use the below expression but getting an error

<c:forEach   begin='1' end='radioCount'> 
            <tr>
            <td>
            <input style='width:500px' type='text' / >
            </td>
            </tr>
            </c:forEach>

Upvotes: 0

Views: 44

Answers (1)

Abdelhak
Abdelhak

Reputation: 8387

Try to use bracktes in your forEach and use double quote " instead of ' in your code:

  <c:forEach   begin="1" end="${radioCount}"> 

Upvotes: 3

Related Questions