ITPub博客

首页 > 应用开发 > Java > 使用JSTL库的时候: According to TLD or attribute directive in tag file, attribute value does not accept any

使用JSTL库的时候: According to TLD or attribute directive in tag file, attribute value does not accept any

原创 Java 作者:zenzuguo 时间:2008-07-25 14:22:40 0 删除 编辑

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

1. 修改web.xml.

改为2.3版本的

http://java.sun.com/dtd/web-app_2_3.dtd">

2. 使用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"%>

就没有问题了

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/106285/viewspace-1007812/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: javascript提交表单
请登录后发表评论 登录
全部评论

注册时间:2012-12-30

  • 博文量
    84
  • 访问量
    844567