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?
Try <c:set var="result" value="${doubleAmount * integerAmount}"/>
please.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.