tags:

views:

14

answers:

2

Hi, Is there a way to use jsp expressions to dynamically name elements like this:

<% for (int x = 0; x < 5; x ++) {%>

<div id ='<%=x%>' name = '<%=x%>'>

//some data

</div>

<%}%>

I am getting unterminated tag compile error on <%=x%>. What can be a solution/workaround for this?

Thanks very much!

A: 

I'd place some whitespaces - <%= x %>

Bozho
A: 

hm.. it works for me without error / warning.

kukudas