I have this strange behavior in my JSP page:
I have two Integer variables count and size.
When I print the values of these variables to the page I’m getting
266 100
but when I use ${count div size} or ${count / size} I’m getting 2.66.
I checked that these both are Integers, also I put them to model, then retrieved in JSP (according to this answer) and printed class names to the JSP and they are Integers.
I know, I can write custom function, but why when that should work?
For your specific case, the EL Spec mandates that both operands should be coerced to
Doublebefore the operator is applied.