学习日记

正在关注 Linux 、开源的个人博客。

首页 | 留言本 | 标签云 | 网站地图 | 美味书签 | Learning Diary | 登录 |

Resin-3.0.18中出现的 “c:if” must not contain the ‘<’ characte

2006年12月30日 上午 11:42 | 作者:littlebat

本站移入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

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

版权所有。转载时必须以链接形式注明作者和原始出处及本声明。

相关日记

随机日记

添加到网摘

[del.icio.us]  [新浪 VIVI]  [365key]  [YouNote]  [博采中心]  [Poco]  [SOHU狐摘]  [天极网摘]  [和讯网摘] 

发表评论

*必填

*必填 (不会被公开)


Copyright © 2004-2008 www.learndiary.com(学习日记)
Powered by WordPress with theme by UCDCHINA for Blogool come from JunChen Wu, nowa
联系版主:mdx-xx at tom dot com。2004.7.25