• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL EL convert Long to String

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day!

I have this code:



I got an error: An exception occured trying to convert String "1/0" to type "java.lang.Long"

Is there a direct way or can I apply casting so that I can be able to do
this?

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two things:

1) Why would you expect "1/0" to be able to convert to a numeric value? What would expect it to evaluate to?

2) Why would you mix <c:forEach> and <logic:iterate>?
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have managed to solve your first question. it's quite okay now.

about your second question, is it bad practice to mix c:for each and
logic iterate?

why?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!