终极解法According to TLD or attribute directive in tag file, attribute select does not accept any expressions
3天硬是是把这个问题解决了 有时候突然上个厕所灵感就来了
第一次向用JSTL解析xml 然后我想遍历整个xml文档打印出来
居然不让我输入变量 那让我怎么办啊
在网上各种找答案
说什么<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>变为:
<%@ taglib prefix="c" uri=http://java.sun.com/jstl/core_rt %>
什么反应都没有啊 然后又上stackoverflow
也没有解决问题
突然灵感来了 我就去看它的源文件


这是eclipse自带的jstl包里面规定解析的地方
打开一看恍然大悟啊
一看就明白啊 原理解析的时候工具是从这找的配置文件


tag就是每个标签的配置文件 拿out举例子 红色部分声明的就是select这个属性能不能有变量 rtexpravlue意思就是“变量表达式”
现在好了 想办法把这个表达式改了就行了 直接改当然不得法 我们只要“欺骗”下工具就行了
1复制出来其中一个文件,比如x.tld,然后再本地修改,因为在工具里面文件只读
2将x.tld里面的你想要改的部分修改,比如我想让select属性有表达式 我就让上面红色的地方改成true
3在工程的web.xml声明这样一段话
<jsp-config>
<taglib>
<taglib-uri>/huang</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>
</jsp-config>
4在具体的jsp页面引用这个你自己定义的"huang"新标签
<%@ taglib prefix="x" uri="/huang" %>
5OK了,现在就可以用这个新标签来看你想干的事了
比如我现在就可以拼接变量了
比如以前我
select里面套变量的话就会报错According to TLD or attribute directive in tag file, attribute select does not accept any expressions
现在:
<x:out select="$casexml//案例//${node.name }" />
两个EL表达式搞定当然用<%=xx%>也可以了
显示正常
对了我的web版本是
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
终极解法According to TLD or attribute directive in tag file, attribute select does not accept any expressions的更多相关文章
- 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 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 ...
- 使用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 ...
- 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 ...
- 解决:According to TLD or attribute directive in tag file, attribute value does not accept any express。
http://blog.csdn.net/lzblog/article/details/22076893 ——————————————————————————————————————————————— ...
- 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: ...
- 使用jstl标签报错:According to TLD or attribute directive in tag file, attribute value
原来jstl标签版本不一样,标签支持不一样. jstl1.0标签库不支持表达式,如: <c:if test="${query01 == null}"> <js ...
随机推荐
- HTML入门基础
前言:学了一段时间的前端,一直没有写博客的习惯,趁着最近学校组织的实训,把知识重新梳理一遍.知识点大部分来自老师上课学习笔记. 1.HTML是什么? HTML 是用来描述网页的一种标记语言. 1)HT ...
- XML格式导出Excel
下面介绍一种导出Excel的方法: 此方法不需要在服务器上安装Excel,采用生成xml以excel方式输出到客户端,可能需要客户机安装excel,所以也不会有乱七八糟的权限设定,和莫名其妙的版本问题 ...
- URI, URL, and URN
URI: uniform resource identifier,统一资源标识符,用来唯一的标识一个资源. URL: uniform resource locator,统一资源定位器,它是一种具体的U ...
- struts2中的action访问web对象
Struts2的Action就是一个普通的POJO对象,它和Web对象request.response.session和application没有耦合在一起,这样便于单独测试Action,那么我们在A ...
- 几项有用的JQUERY代码
检测IE浏览器 在进行CSS设计时,IE浏览器对开发者及设计师而言无疑是个麻烦.尽管IE6的黑暗时代已经过去,IE浏览器家族的人气亦在不断下滑,但我们仍然有必要对其进行检测.当然,以下片段亦可用于检测 ...
- php ajax 同时验证 用户名 密码
今天写了一个程序分享给大家,该程序是ajax密码和用户名验证问题 第一步 先在数据库里建立一张表 有3个字段 为 id name pass 第二步 写html页面,需要引入jq库 请到官网自行下载 & ...
- Frogger(最短路)
Frogger(poj2253) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 31854 Accepted: 1026 ...
- information_schema.character_sets 学习
information_schema.character_sets 表用于查看字符集的详细信息 1.character_sets 常用列说明: 1.character_set_name: 字符集名 2 ...
- [TYVJ] P1006 ISBN
ISBN 背景 Background NOIP2008年普及组第一题 描述 Description 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字.1位识别码和3位 ...
- BZOJ 3576 江南乐
http://www.lydsy.com/JudgeOnline/problem.php?id=3576 思路:由于数字巨大,因此N^2异或做法是过不了的,我们考虑将n个石子分成i堆,那么会有n%i堆 ...