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 ...
随机推荐
- 仿京东Tab商品切换
在线演示 本地下载
- 安装pycurl
环境:ubuntu 1604 安装 pycurl 遇到一些问题 简单记录 1.安装 pippython2:apt install python-pippython3: apt install pyth ...
- mysql全库搜索指定字符串
mysql全库搜索指定字符串 DELIMITER // DROP PROCEDURE IF EXISTS `proc_FindStrInAllDataBase`; # CALL `proc_FindS ...
- java基础(6)--数组和方法
数组 1. 什么是数组? 数组是相同数据类型的元素组成的集合.这些元素按线性顺序排列.所谓线性顺序是指除第一个元素外,每一个元素都有唯一的前驱元素:除最后一个元素外,每一个元素都有唯一的后继元素.(“ ...
- Oracle常见的几种登录方式
1.运行SQLPLUS工具 C:\Users\csb>sqlplus(回车) (输入账户)system(回车) (输入密码) (回车) 2.直接进入SQLPLUS命令提示符,无用户的登陆 C:\ ...
- golang learning
开发用py和go 入职前学了几天py入职后看的代码也是py 现在终于还是要学go了 初体验:感觉和c py都很像 入门语法看起来很简单的样子 学了py之后现在各种随意 需要多注意 在函数传参的时候 c ...
- Linux Wget 命令
Linux wget是一个下载文件的工具,它用在命令行下.对于Linux用户是必不可少的工具,尤其对于网络管理员,经常要下载一些软件或从远程服务器恢复备份到本地服务器.如果我们使用虚拟主机,处理这样的 ...
- 去除掉myeclipse2017页面右上角的图片
图标如下所示,这是方便测试用的,但是有时候也很碍人. 在servers中进行关闭,操作如下所示: 点击图中的CodeLive就可以使图标消失,再次点击图标会再次出现.
- yii2:frontend/frontactoin curl生成
yii2:frontend/frontactoin curl生成 想要覆写已存在文件,选中 “overwrite” 下的复选框然后点击 “Generator”.如果是新文件,只点击 “Generato ...
- Vector3函数理解-计算两向量之间的角度
1.已知两个向量dirA,dirB.Vector3 dirA = new Vector3(-1,1,0); Vector3 dirB = new Vector3(-1,1,1);2.使向量处于同一个平 ...