Resin-3.0.18中出现的 "c:if" must not contain the '<' characte

本站移入Resin3.0.18后出现了一些问题,其中就是当调用一个jsp文件:/disall2.jsp时,出现下列报错,而这在原来的Resin2.*和Tomcat5.0.*是没有出现过的。


500 Servlet Exception

/disall2.jsp:1: org.xml.sax.SAXParseException: The value of attribute "test"

associated with an element type "c:if" must not contain the '<' character.

Resin-3.0.18 (built Fri, 24 Feb 2006 02:47:03 PST)

经过一行一行的检查文件中的<c:if>标记(JSTL的标记),发现下面一段可疑的代码:


     <c:if test="false">

      <font size="3">

     </c:if>

     <c:if test="false">

      <font size="4">

     </c:if>

里面有小于号“<”,于是试着把上面的代码改成:


     <c:if test="false">

      <font size="3">

     </c:if>

     <c:if test="false">

      <font size="4">

     </c:if>

这样,就OK了。

在JSTL的关系运算中,有两套等效的运算符。如:ge 相当于 >= ;lt 相当于 < ;le 相当于 <= 等等。

完整的有:


类别  运算符

算术运算符 + 、 - 、 * 、 / (或 div )和 % (或 mod )

关系运算符 == (或 eq )、 != (或 ne )、 < (或 lt )、 > (或 gt )、 <= (或 le )和 >= (或 ge )

逻辑运算符 && (或 and )、 || (或 or )和 ! (或 not )

验证运算符 empty

但是它们的使用有什么区别呢?我还不知道。谁知道了提一下,谢谢。