您的位置:首页 > 编程语言 > Java开发

jsp 中使用 struts 标签 EL 表达式编译不通过

2012-03-30 15:19 197 查看
在jsp代码中:

<s:set name="score" value="80"></s:set>
<s:if test="${score > 60}">
你的成绩及格了
</s:if>


结果运行之后,网页上出现这么句:

According to TLD or attribute directive in tag file, attribute test does not accept any expressions

这个是因为不能识别EL表达式出现的问题。

在jsp首部 <%@ page%>中添加一个值:

<%@ page isELIgnored="true"%>


再编译就可以了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: