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. jQuery中click()与trigger方法的区别

    click()可以执行单击事件,但是不可传参. $("button").click(function(){ alert("hello."); }); trigg ...

  2. HTML\Script 去除关键字

    以下是引用片段: ----- /**/ /// <summary> /// 去除HTML标记 /// </summary> /// <param name="N ...

  3. cocos2d-x 2.2.6中c++通过JNI与java互调

    1.HelloCpp.java /**************************************************************************** Copyri ...

  4. canvas写的一个小时钟demo

    <!DOCTYPE html> <html> <head> <title>HTML5 Canvas Demo of clock</title> ...

  5. (原)ubuntu16中安装moses

    转载请注明出处: http://www.cnblogs.com/darkknightzh/p/5653186.html 在ubuntu14中,可以使用下面的语句安装moses: luarocks in ...

  6. CSS3动画之旋转魔方盒

    步骤: 1.大盒子里盛放六个子盒子代表立方体的6个面: 2.子盒子开启3d效果  transform-style:preserve-3d; 3.上下面沿X轴旋转90度,一个上移盒子一半高,一个下移盒子 ...

  7. 如何让EcStore和微博同步来推广网站

    EcStore是创建B2C商城的首选PHP系统,它功能强大.操作方便,安装后马上就能建立起一个自己的B2C商城,但建好后如何推广运营商城却不是件容易的事. 新浪微博用户数量大.传播速度快,互联网上拥有 ...

  8. python之3内置容器

    所谓内置容器,就是不需要第三方模块,就可以使用的. 1.list容器,一个有序序列,类似于数组,但比数组强大很多 1.1.如何初始化list,直接一个[]即可,这是一个空的list >>& ...

  9. wordpress教程之在非single.php页面调用文章的信息

    使用Wordpress的朋友可能遇到这样的问题,在非single.php页面中我们有时候想要调用当前文章的标题.内容等信息,而Wordpress在生成文章页的时候在各个页面中唯一不变的只有当前的文章I ...

  10. Google谷歌搜索引擎登录网站 - Blog透视镜

    建置好了网站之后,为了能提升流量或是增加曝光度,Mix通常会到Google谷歌,用手动登录的方式,登录网站,不久之后,搜索引擎就会派遣蜘蛛机器人,来检索你的网站,等一段时间之后,就会出现在搜索引擎内, ...