jstl错误排除:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
问题描述:
在 JSP 页面中使用 JSTL 标签库,访问 JSP 页面时抛出了如下异常信息:
org.apache.jasper.JasperException: /index.jsp (line: , column: ) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:)
org.apache.jasper.compiler.Node$Root.accept(Node.java:)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:)
javax.servlet.http.HttpServlet.service(HttpServlet.java:)
…… ……
问题原因:
因为使用了 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"%>
注意:修改完后,重启Tomcat服务器,就可以修改完成了。
jstl错误排除:According to TLD or attribute directive in tag file, attribute value does not accept any expressions的更多相关文章
- 使用jstl报错:According to TLD or attribute directive in tag file, attribute value does not accept any expressions
使用jstl报错:According to TLD or attribute directive in tag file, attribute value does not accept any ex ...
- 使用jstl标签报错:According to TLD or attribute directive in tag file, attribute value
原来jstl标签版本不一样,标签支持不一样. jstl1.0标签库不支持表达式,如: <c:if test="${query01 == null}"> <js ...
- 错误处理——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 valu ...
- According to TLD or attribute directive in tag file, attribute value does not accept any expressions
1.错误描写叙述 2014-7-13 17:27:21 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one ...
- EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any expressions
EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any ex ...
- According to TLD or attribute directive in tag file, attribute test does not accept any expressions
HTTP Status 500 - /WEB-INF/views/emp/list.jsp (line: 30, column: 4) According to TLD or attribute di ...
- According to TLD or attribute directive in tag file, attribute end does not accept any expressions
问题描述: 在 JSP 页面中使用 JSTL 标签库,访问 JSP 页面时抛出了如下异常信息: org.apache.jasper.JasperException: /WEB-INF/manageUs ...
- 终极解法According to TLD or attribute directive in tag file, attribute select does not accept any expressions
3天硬是是把这个问题解决了 有时候突然上个厕所灵感就来了 第一次向用JSTL解析xml 然后我想遍历整个xml文档打印出来 居然不让我输入变量 那让我怎么办啊 在网上各种找答案 说什么<%@ t ...
- According to TLD or attribute directive in tag file, attribute items does not accep t any expressions
According to TLD or attribute directive in tag file, attribute items does not accep t any expression ...
随机推荐
- Kotlin学习记录3
参考我的博客:http://www.isedwardtang.com/2017/09/04/kotlin-primer-3/
- nor flash的一般操作与分析
是现在市场上两种主要的非易失闪存技术.Intel于1988年首先开发出NOR Flash 技术,彻底改变了原先由EPROM(Electrically Programmable Read-Only-Me ...
- The remote end hung up unexpectedly while git cloning
https://stackoverflow.com/questions/6842687/the-remote-end-hung-up-unexpectedly-while-git-cloning Qu ...
- HP P420i Smart Array
http://blog.mpecsinc.ca/2013/02/hp-p420i-smart-array-adding-4-new-disks.html https://techzone.ergon. ...
- 第一篇:Spark SQL源码分析之核心流程
/** Spark SQL源码分析系列文章*/ 自从去年Spark Submit 2013 Michael Armbrust分享了他的Catalyst,到至今1年多了,Spark SQL的贡献者从几人 ...
- ubuntu 支持中文
1.cat /usr/share/i18n/SUPPORTED 说明:查看系统支持的字符集,你需要注意的是支持字符集的格式,如对中文会有以下一些显示(我的系统如此,我不知是否普遍) zh_CN.GB1 ...
- SQLServer行列转换PIVOT函数中聚合函数的使用意义及选择
例子:https://blog.csdn.net/wikey_zhang/article/details/76849826 DECLARE @limitDay INT;SET @limitDay = ...
- Flume-NG中的Channel与Transaction关系(原创)
在sink和source中(不管是内置还是自定义的),基本都有如下代码,这些代码在sink中的process方法中,而在source中自己不需要去写,在source中getChannelProcess ...
- InfiniBand技术和协议架构分析
Infiniband开放标准技术简化并加速了服务器之间的连接,同时支持服务器与远程存储和网络设备的连接. IB技术的发展 1999年开始起草规格及标准规范,2000年正式发表,但发展速度不及Rapid ...
- Maven到底是个啥玩意
Maven,是基于项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具. 上面是百度百科对Maven的正式介绍,如果你是Maven初学者,我估计你看完之后心中肯 ...