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

在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"%>

再编译就可以了。

posted @ 2012-03-30 15:19  lihui_yy  阅读(763)  评论(0编辑  收藏  举报