原来部署在Tomcat6中的应用在Tomcat7中运行时报错如下错误:

java.lang.IllegalArgumentException: taglib definition not consistent with specification version

严重: Parse error in application web.xml file at jndi:/localhost/iot/WEB-INF/web.xml
org.xml.sax.SAXParseException; systemId: jndi:/localhost/iot/WEB-INF/web.xml; lineNumber: 217; columnNumber: 10; Error at (217, 10) : taglib definition not consistent with specification version

经百度发现,Tomcat7中对Web应用web.xml中的taglib标签配置稍有不同,需要在taglib标签外添加“jsp-config”标签进行包裹才行。

TomcatV6中的配置:

<taglib>
<taglib-uri>sys</taglib-uri>
<taglib-location>/WEB-INF/SysTag.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>tiles</taglib-uri>
<taglib-location>/WEB-INF/tiles-jsp.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts-tags</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>

TomcatV7中的配置:

<jsp-config>
<taglib>
<taglib-uri>sys</taglib-uri>
<taglib-location>/WEB-INF/SysTag.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>tiles</taglib-uri>
<taglib-location>/WEB-INF/tiles-jsp.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>struts-tags</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
</jsp-config>

更新配置后即可正常启动。

Tomcat6和7版本对web.xml中taglib标签的配置差异的更多相关文章

  1. JSP/JSF从web.xml中取出context-param的配置信息

    JSP/JSF从web.xml中取出context-param的配置信息. 应用场景:我们配置了项目的版本信息,想让他显示在页面上,如: <context-param><!-- ## ...

  2. web.xml 中<taglib>报错(转载)

    在web.xml加入taglib <taglib> <taglib-uri>/WEB-INF/tiles.tld</taglib- uri> <taglib- ...

  3. web.xml中<welcome-file-list>标签不起作用

    之前也都提到过,web.xml会通过<servlet>和<servlet-mapping>来确定url和指定contoller文件,乃至于jsp页面的联系. 但是有一个< ...

  4. web.xml中load-on-startup标签的含义

    在servlet的配置当中,<load-on-startup>5</load-on-startup>的含义是: 标记容器是否在启动的时候就加载这个servlet. 当值为0或者 ...

  5. web.xml中同一servlet/filter配置多个url-pattern

    转自:http://blog.sina.com.cn/s/blog_4c2c2a0c0100dh67.html 若你的servlet要多个地址,或你的filter需要过滤不同的url如有*.jsp,* ...

  6. web.xml的加载过程配置详解

      一:web.xml加载过程 简单说一下,web.xml的加载过程.当我们启动一个WEB项目容器时,容器包括(JBoss,Tomcat等).首先会去读取web.xml配置文件里的配置,当这一步骤没有 ...

  7. web.xml中不同版本的servlet头以及版本控制

    参考文章: http://www.cnblogs.com/beijingstruggle/p/5461146.html http://blog.csdn.net/z69183787/article/d ...

  8. eclipse环境Dynamic web module version 3.1版本的进步,简化Dynamic web object 中Servlet类的配置,不用web.xml配置<Servlet>

    eclipse环境Dynamic web module version 3.1版本之前,Dynamic web object 中Servlet类的配置,要在web.xml 配置<Servlet& ...

  9. IntelliJ IDEA 2019.1.1 maven框架web.xml中web-app版本过低导致不能正常使用EL表达式的解决方案

     1.软件版本 IDEA版本:IntelliJ IDEA 2019.1.1 maven版本:apache-maven-3.6.1 Tomcat版本:tomcat-8.5 2.问题描述 IDEA使用如下 ...

随机推荐

  1. 光纤通信(codevs 1955)

    题目描述 Description 农民John 想要用光纤连通他的N (1 <= N <= 1,000)个牲口棚(编号1..N).但是,牲口棚位于一个大池塘边,他仅可以连通相邻的牲口棚.J ...

  2. 【HDOJ4322】Candy(费用流)

    题意:给N个孩子分配M个糖果. 有一个N*M的矩阵表示孩子和糖果的关系,若第i行第j列的数是1则表示第i个孩子喜欢第j个糖果,反之不喜欢. 已知,若一个孩子被分配到他喜欢的糖果那么他将获得K的快乐值, ...

  3. linux 磁盘阵列

    1.独立磁盘冗余阵列 (RAID) 2.RAID级别: raid0 扩展卷 (条带卷) 至少一块硬盘 具有较高的存储性能 数据请求多块硬盘并行应答 连续数据分散到多个磁盘存储 ,一块磁盘坏掉所有文件就 ...

  4. [bzoj2443][Usaco2011 Open]奇数度数_树形dp_生成树_并查集

    奇数度数 bzoj-2443 Usaco-2011 Open 题目大意:给定一个n个点m条便有向图,问是否有一种选出一些边的方式使得所有点的度数都是奇数. 注释:$1\le n \le 5\cdot ...

  5. 18.9.22 noip模拟赛

    此题为找规律.期望100 实际100 #include<cstdio> #include<cstring> #include<iostream> #include& ...

  6. 使用百度网盘实现自动备份VPS

    http://ju.outofmemory.cn/entry/51536 经过轰轰烈烈的一轮网盘大战,百度网盘的容量已经接近无限(比如我的是3000多G ),而且百度网盘已经开放API,所以用来备份V ...

  7. 【转】golang中的并行与并发

    原文:http://blog.csdn.net/taohaoge/article/details/27970421 ------------------------------------------ ...

  8. C# 控制台程序如何输出Messagebox

    1 添加如下引用   2 添加引用和Messagebox的代码.   3 测试可行                

  9. vux 实现多栏滚动

    1.PopupPicker 组件 <!-- vux-ui --> <template> <div> <!-- 标题栏 --> <x-header ...

  10. 在JAR中打包使用JAR库

    不知大家在写Java程序的时候有没有这种需求: 将引用其他第三方JAR库的项目打包成一个JAR文件执行.也就是说在你打包好的JAR文件里再包括那些你引用的第三方JAR文件,合成一个JAR包,这样仅仅需 ...