Reputation: 1
If I set two variables in my controller:
double doubleAmount = 18.0;
int integerAmount = 2;
And then try to multiply them in my JSTL code:
<c:set var="result" value="${doubleAmount} * ${integerAmount}"/>
I get this error:
javax.servlet.ServletException:
javax.servlet.jsp.JspException:
In <formatNumber>,
value attribute can not be parsed into java.lang.Number:
"18.0 * 2"
How do I perform this operation in my JSTL code?
Upvotes: 0
Views: 7827
Reputation: 2367
Try <c:set var="result" value="${doubleAmount * integerAmount}"/>
please.
Upvotes: 4