Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[JSTL] how can I convert values (string to int) in JSTL  RSS feed

 
Csaba Szegedi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I would like to give an expression "3-${i}" to c:forEach end, and I got the following error

javax.servlet.jsp.el.ELException: An exception occured trying to convert String "3-1" to type "java.lang.Integer"
at org.apache.commons.el.Logger.logError(Logger.java:481)

..... the actual code is

<c:set var="i" value="1" />

<c:forEach var="j" begin="1" end="3-${i}" step="1">
<cut value="${j}" /><br />
</c:forEach>
......

How can I solve this issue ?

Thanks in advance.

cscsaba

 
Devaka Cooray
Marshal
Posts: 5323
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"csaba cs", please check your private messages regarding an important administrative matter.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Csaba Szegedi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

thanks really, i was lost sorry
Bear Bibeault wrote:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!