0

So I am doing something like this for numbers:

<c:set var="n" value="${n+1}"/>

Is there an equivalent for incrementing a letter? If 'a', then set as 'b', if 'd' then set as 'e' ? Something like:

<c:set var="c" value="${c++}"/>
ZakTaccardi
  • 12,212
  • 15
  • 59
  • 107

1 Answers1

1

The top answer here seems to have it. I would suggest using a scriptlet to get it done. This will let you execute and embed simple java function calls in your JSP

<c:set var="c" value="<%=Character.toChars( ## int value of c++ ##)%>"/>
Community
  • 1
  • 1
darkpbj
  • 2,892
  • 4
  • 22
  • 32