JSP 页面中使用 JSTL 标签库,访问 JSP 页面时抛出了如下异常信息:

org.apache.jasper.JasperException: /index.jsp (line: 261, column: 54) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)

原因:因为使用了 JSP 2.0, 但又没有使用 JSTL 标签库的备用版本(RT库)

解决

方案1. 修改web.xml

<!--将 web.xml 中的 声明由 2.4 或 2.5 版本的修改为 2.3 版本-->
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

修改为:

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

方案2. 使用JSTL core RT库
JSTL 标签库的有两种 taglib 伪指令, 其中 RT 库即是依赖于 JSP 传统的请求时属性值, 而不是依赖于 EL 来实现:

只要将

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

改为

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

jstl错误:According to TLD or attribute directive in tag file, attribute value does not accept any expr相关推荐

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

    在运用标准标签库和EL表达式写JSP页面的时候,有时候会报500错误 执行某jsp页面时,弹出如标题所示异常,jsp代码如下: <%@ page language="java" ...

  2. 【问题解决】使用fmt格式化时间出现According to TLD or attribute directive in tag file, attribute value does not acce

    解决办法: 将标签: <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> 改 ...

  3. 关于调用 Angular 属性指令 attribute Directive 是否需要带中括号的问题

    属性型指令,应用在宿主元素时不需要中括号: 效果如下图黄色高亮区域所示: 从外界传值给 Angular attribute Directive: 这里需要给 highlight Directive 创 ...

  4. 解决Linux下MySQL启动错误Starting MySQL.Manager of pid-file quit without updating file.[FAILED]...

    刚装完MySQL,启动时报如下错误: Starting MySQL.Manager of pid-file quit without updating file.[FAILED] 解决Linux下My ...

  5. Python编码错误的解决办法SyntaxError: Non-ASCII character ‘\xe5‘ in file

    Python编码错误的解决办法SyntaxError: Non-ASCII character '\xe5' in file  [现象] 在编写Python时,当使用中文输出或注释时运行脚本,会提示错 ...

  6. linux uuid错误,Linux 错误:fatal error: uuid/uuid.h: No such file or directory

    重新configure 后,出现别的错误:fatal error: uuid/uuid.h: No such file or directory 这是因为没有uuid库和头文件,需要安装e2fspro ...

  7. .Net Attribute详解(下) - 使用Attribute武装枚举类型

    接上文.Net Attribute详解(上)-Attribute本质以及一个简单示例,这篇文章介绍一个非常实用的例子,相信你一定能够用到你正在开发的项目中.枚举类型被常常用到项目中,如果要使用枚举To ...

  8. python xlrd 错误:xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF reco

    如: import xlrd xls=xlrd.open_workbook('casedata.xls') table=xls.sheets()[0] print(table) 错误:xlrd.bif ...

  9. java文件批量重命名文件,文件批量工具(File Attribute Changer)

    文件批量工具(File Attribute Changer)是一款对文件属性批量修改,以及对文件批量重命名的工具,所 谓的文件属性是指隐藏属性,在查看磁盘文件的名称时,系统一般不会显示具有隐藏属性的文 ...

最新文章

  1. Android-支持多屏幕[译文-2]
  2. 研究人员利用脑电ErrP信号实时控制机器人
  3. 修改系统默认区域语言日期格式
  4. vim的介绍与常用的命令
  5. 学习OpenCV——ORB简化版Location加速版
  6. PIL修改带有透明像素的png图片颜色
  7. llnmp 环境一键部署 2种安装方法
  8. linux上的pcb设计软件,PCB设计软件(CadSoft Eagle Professional)
  9. 三边定位算法 matlab,三边测量法的MATLAB定位程序说明.doc
  10. Java实习日记(1)
  11. 115网盘如何打开php文件格式,opensuse安装115网盘客户端
  12. U盘格式化了怎样恢复还原(必学技能)
  13. erlang之ets总结
  14. 构建创新数字基础设施,中泰证券携手华为迈进数字化转型“快车道”
  15. 阿里云盘内测邀请码是多少?阿里云盘邀请码获得方法
  16. 怎样打印微信文档文件?
  17. ELK生态系统——修改es中index的mapping平滑过渡数据
  18. [Jzoj] 3426. 封印一击
  19. 数据分析的心法、手法和利器
  20. 金立e3t刷android4.4,金立E3T 刷机包 百度云完美版

热门文章

  1. 卷积与反卷积、步长(stride)与重叠(overlap)及 output 的大小
  2. 软件安装下载的镜像站、国内源
  3. 机器学习基础(二十六)—— 将 SVM 推广到多类问题
  4. C基础——文本格式和二进制格式的区别
  5. visual设计的界面发布到iis上显示不一样_Material Design暗夜模式设计指南
  6. 0基础学python做什么工作好-零基础自学python到什么程度才有机会去小公司实习?...
  7. python代码-你见过哪些令你瞠目结舌的 Python 代码技巧?
  8. python课程价格-python课程价格
  9. python处理excel的优势-Python处理Excel数据的坑,一文让你不用重复犯错
  10. python使用-Python 应该怎么去练习和使用?