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 ...
随机推荐
- C语言预处理命令之条件编译(#ifdef,#else,#endif,#if等)
转自:http://www.kuqin.com/language/20090806/66164.html 预处理过程扫描源代码,对其进行初步的转换,产生新的源代码提供给编译器.可见预处理过程先于编译器 ...
- 《网络攻防》 MSF基础应用
20145224陈颢文 <网络攻防>MSF基础应用 基础问题回答 用自己的话解释什么是exploit,payload,encode: exploit:攻击手段,是能使攻击武器(payloa ...
- spring和hibernate整合时报sessionFactory无法获取默认Bean Validation factory
Hibernate 3.6以上版本在用junit测试时会提示错误: Unable to get the default Bean Validation factory spring和hibernate ...
- Mybatis plus 高级
最近项目重构 dao层使用的Mybatis plus,有必要总结下. Mybatis plus 会自动维护Mybatis 以及 MyBatis-Spring 相关依赖 所以在构建项目时候 只需要引入 ...
- LeetCode——Add Strings
LeetCode--Add Strings Question Given two non-negative integers num1 and num2 represented as string, ...
- PAT1076. Forwards on Weibo (30)
使用DFS出现超时,改成bfs DFS #include <iostream> #include <vector> #include <set> using nam ...
- on绑定阻止冒泡失败
使用zepto库,有如下dom <div id="J_parent"> <a href="#"> <span>点我有惊喜&l ...
- java 实现Serv-U FTP 和 SFTP 上传 下载
两种ftp使用java的实现方式 ,代码都已测试 第一种:Serv-U FTP 先决条件: 1.Serv-U FTP服务器搭建成功. 2.jar包需要:版本不限制 <!--ftp上传需要的jar ...
- mysql 创建数据库 并设置utf8格式
CREATE DATABASE `database` CHARACTER SET utf8 COLLATE utf8_general_ci; 设置utf8之后,不容易出现中文乱码.
- QTabWidget和QtabBar的区别
切换标签tab 是QTabBar int QTabWidget::insertTab ( int index, QWidget * page, const QString & label ) ...