【问题标题】:perform action on bean property struts jstl对 bean 属性 struts jstl 执行操作
【发布时间】:2023-03-29 12:32:01
【问题描述】:
到目前为止,我在 Struts 中有 bean (name=tF),我们正在使用 scriplets 对其变量执行操作 有人可以帮助删除 scriplets 并使用 jsp 标签或 Struts 标签
<bean:define name="tF" property="varin" id="lvarin" type="java.lang.Integer"/>
<%=(lvarin.intValue()/100.00) %>
【问题讨论】:
标签:
java
jsp
struts
struts-1
【解决方案1】:
你可以使用 jstl 1.2
<bean:define name="tF" property="varin" id="lvarin" type="java.lang.Integer"/>
${(lvarin.intValue()/100.00)}
【解决方案2】:
尝试使用 JSTL 语法:${tF.varin / 100}
不需要 scriptlet 或 Struts 标签。