终极解法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 ...
随机推荐
- Canvas Api简介1
canvas canvas 其实对于HTML来说很简单,只是一个标签元素而已,自己并没有行为,但却把一个绘图 API 展现给客户端 JavaScript 以使脚本能够把想绘制的东西都绘制到一块画布上, ...
- js如何关闭当前页,而不弹出提示框
//关闭当前页面,并且打开新页面,(不提示) function closeWinAndOpen(url) { //利用随机数处理WinName var sWinName = "LR" ...
- Android生命周期注意事项
生命周期图解 以下英文引用全部来自google官方文档说明,方便理解. onCreate (Bundle savedInstan ...
- C# socket网络编程 基于TCP协议
socket 服务器端: 1.创建socket Socket tcpClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ...
- 7、Khala设备资源的申请和释放
在实际业务中,我们每次登录后,可能需要在服务端维护一些设备相关的资源信息,而不同设备所需维护的资源信息又不尽相同.Khala提供了设备资源的维护储存功能,在此我们通过一个具体的业务中对其进行展示. 一 ...
- [hdu5136]Yue Fei's Battle 2014 亚洲区域赛广州赛区J题(dp)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud 现场赛的时候由于有个地方有点小问题,没有成功AC,导致与金牌失之交臂. 由于今天下 ...
- linux下python多版本共存
为何要安装python,linux下不是已经集成了python吗? 大多数linux系统都集成了python,但是他们的版本太低了.不能满足我们的需求,尤其是好多系统居然仍停留在 python2.6. ...
- SpringMvc项目 FastJson的数据中有$ref解决办法
这是FastJson返回的数据,经过在线json格式转换工具转换的数据 阴影部分套用上面的dept(部门)信息,使用easyui只能获取第一行,凡是引用的都无法获取 经各种搜索: 推荐网址:http: ...
- CSS3动画之无缝滚动
与js的无缝滚动类似,整个承载图片的盒子移动,克隆一组图片放置最后,当一组图片播放结束后将盒子定位在有一组图片宽度的左侧 HTML结构: <div class="box"&g ...
- Maven的使用--Eclipse在线安装Maven插件m2e
我使用的Eclipse版本是3.7(Indigo) 通过Eclipse的help选项,点击“Install New Software...”弹出安装对话框, 点击add按钮,在Location里输入h ...