Hi Can we assign scriptlet variable value to div id in jsp? Im trying like this in my jsp:
<%int nc=1; %>
<div id="nc"+<%=nc%> class="n_content active">
Some div content
<%nc++;%>
</div>
<div id="nc"+<%=nc%> class="n_content" style="opacity: 1;">
Some div content
<%nc++;%>
</div>
The output i wanted is
<div id="nc1" class="n_content active">
Some div content
<%nc++;%>
</div>
<div id="nc2" class="n_content" style="opacity: 1;">
Some div content
<%nc++;%>
</div>
But Im unable to get this.. Can someone tell me where Im going wrong?