首页 > 解决方案 > JSTL标签处理 EL 算术运算或只是吐出字符串?

问题描述

我在 jsp 中有一个 EL 表达式 ${4+(param.a)*4}。

将其更改为以下代码行会先进行算术运算,然后将结果作为字符串吐出,还是先将整个表达式评估为字符串?

<c:out value='${4+(param.a)*4}'/>

我想先进行算术运算,然后将结果输出为字符串。

标签: jstlel

解决方案


Arithmetic operation first and gives you the result which will be printed in html element.


推荐阅读