How to convert int to char in JSP expression language?

Posted by james.bunt on Stack Overflow See other posts from Stack Overflow or by james.bunt
Published on 2011-01-07T01:48:24Z Indexed on 2011/01/07 1:54 UTC
Read the original article Hit count: 652

Filed under:
|
|
|

I need to display incremented single characters to denote footnotes in a table of data in a JSP. In Java I would normally have a char variable and just increment it, or convert an int to a char by casting it (e.g. (char)(i + 97) to convert a 0-based index to a-z). I can't figure out how to do this in expression language short of writing my own JSTL function.

Does anyone know how to convert an int to char in EL? Or how to increment a char variable in EL? Or possibly even a better technique to do what I'm trying to do in JSP/EL?

Example of what I need to be able to produce:
a mydata
b myotherdata
...
a first footnote
b second footnote

© Stack Overflow or respective owner

Related posts about jsp

Related posts about char