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

本文讨论了在应用部署运行过程中遇到的JSP异常问题,特别是当使用JSTL库时出现According to TLD or attribute directive in tag file, attribute value does not accept any expressions的错误。文章提供了使用JSTL core RT库作为解决方案的简单方法,并解释了两种taglib伪指令的区别,以及JSP 2.4版本不兼容的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

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

分类: 错误处理   125人阅读  评论(0)  收藏  举报

 应用部署运行的时候出现JSP异常, 发生在使用JSTL库的时候: According to TLD or attribute directive in tag file, attribute value does not accept any expressions, 可能是因为使用了JSP2.0版本, 同时又没有使用JSTL core库的备用版本(RT库), 一种简单的解决方法是使用JSTL core RT库

 

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

JSP中使用<%@ taglib uri=http://java.sun.com/jstl/core prefix="c"%>在2.3版本都可以,在2.4就不行了, 难道是版本不兼容吗?

只要将

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

改为

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

http://blog.youkuaiyun.com/jasper_success/article/details/6693434
http://blog.youkuaiyun.com/rainertop/article/details/5912779
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值