错误处理——According to TLD or attribute directive in tag file, attribute test does not accept any expres

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

 使用技术:Jsp 。  为什么会出现问题:使用JSTL库的 fmt格式化标签。

 

项目运行的时出现JSP异常, 发生在使用JSTL库的时候,

 可能是因为使用了JSP2.0版本, 同时又没有使用 JSTL fmt库的备用版本(RT库),

一种简单的解决方法是使用JSTL fmt RT库

JSTL “ fmt库 ” 的有两种” taglib “伪指令, 其中 "RT库" 即是依赖于JSP传统的请求时属性值, 而不是依赖于"EL"来实现(称为"EL库".JSP2.0将支持EL)

JSP页面中 加入 <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

 在 " 2.3 " 版本都可以。在 " 2.4 " 就不行了, 难道是版本不兼容吗?

试着将 :

<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

改为 :区别就fmt结尾多加了_rt (被称为RT库)。

<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>

 

 

posted @ 2019-10-15 15:01  赖伟春  阅读(255)  评论(0编辑  收藏  举报