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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 使用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 ...

  6. 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 ...

  7. 解决:According to TLD or attribute directive in tag file, attribute value does not accept any express。

    http://blog.csdn.net/lzblog/article/details/22076893 ——————————————————————————————————————————————— ...

  8. 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: ...

  9. 使用jstl标签报错:According to TLD or attribute directive in tag file, attribute value

    原来jstl标签版本不一样,标签支持不一样. jstl1.0标签库不支持表达式,如: <c:if test="${query01 == null}">   <js ...

随机推荐

  1. 《JavaScript 闯关记》之事件

    JavaScript 程序采用了异步事件驱动编程模型.在这种程序设计风格下,当文档.浏览器.元素或与之相关的对象发生某些有趣的事情时,Web 浏览器就会产生事件(event).例如,当 Web 浏览器 ...

  2. <modules runAllManagedModulesForAllRequests="true" />(转1)

    最近在使用 MVC 开发的时候,遇到一个对我来说“奇怪的问题”,就是使用 BundleTable 进行 CSS.JS 文件绑定,然后使用 Styles.Render.Scripts.Render 进行 ...

  3. “有箭头的视图”,即程序的Storyboard Entry Point。

    设置方法很简单:打开StoryBoard文件,选中要设置为第一视图的ViewController,在右边工具栏勾选Is Initial View Controller就好了,此时你会看到ViewCon ...

  4. SQL Server一些常见却不太记得住的命令

    一.数据库大小查询 1. exec sp_spaceused '表名'          --(SQL统计数据,大量事务操作后可能不准)2. exec sp_spaceused '表名', true  ...

  5. (原)Microsoft Source Reader的简单使用

    感觉Microsoft Source Reader还是比较坑的,只是由于需要,不得不使用.其实按照Microsoft提供的示例,基本上可以正常的调试出程序来. 下面的例子,简单的给出了Source R ...

  6. 我的开源框架之Accordion控件

    需求: (1)实现手风琴面板控件,支持静态HTML与JSON方式创建控件 (2)支持远程加载数据 (3)支持面板激活.远程加载事件注册 (4)支持动态添加.删除项目 实现图例 客户代码 <div ...

  7. 秒(s) 毫秒(ms) 微秒(μs) 纳秒(ns) 皮秒(ps)及Java获得 .

    Date date=new Date(); long hm=date.getTime(); //获取毫秒 或者 毫秒级:System.currentTimeMillis() 纳秒级: System.n ...

  8. Python 之socket的应用

    本节主要讲解socket编程的有关知识点,顺便也会讲解一些其它的关联性知识: 一.概述(socket.socketserver): python对于socket编程,提供了两个模块,分别是socket ...

  9. Win7网络检测 WindowsAPICodePack

    原文:http://www.cnblogs.com/yincheng01/archive/2010/05/30/2213234.html 在Windows7操作系统下,支持的网络类型越来越复杂,微软提 ...

  10. python手记(45)

    python 声音编辑,减少音量 #!/usr/bin/env python # -*- coding: utf-8 -*- #http://blog.csdn.net/myhaspl #code:m ...