原来部署在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. 共享一个NOI用过的vimrc [rc][vimrc]

    set nocp set nu set ru set noet set ai set cin set mouse =a set mp=g++\ %\ -o\ %<\ -g\ -Wall\ -Ws ...

  2. POJ 3169_Layout

    大早上水一发=.= 题意: n头牛按编号顺序站成一列,给定n头牛之间的位置关系,求出第n头牛和第一头牛之间的最大距离. 分析: 差分约束系统,这题不等式关系还是挺好找的.注意因为按照顺序排列,所以有d ...

  3. hdu4701 Game(递推博弈)

    题意: Alice初始有A元,Bob有B元. 有N个物品,第i个物品价值为Ci.Alice和Bob轮流买一些(>=1)物品.不能移动的人输.购买有一个限制,对于第1 个之后物品,只有当第i-1个 ...

  4. 洛谷 P1457 城堡 The Castle

    P1457 城堡 The Castle 题目描述 我们憨厚的USACO主人公农夫约翰(Farmer John)以无法想象的运气,在他生日那天收到了一份特别的礼物:一张“幸运爱尔兰”(一种彩票).结果这 ...

  5. 使用spark 计算netflow数据初探

    spark是一个高性能的并发的计算平台,而netflow是一种一般来说数量级很大的数据.本文记录初步使用spark 计算netflow数据的大致过程. 本文包括以下过程: 1. spark环境的搭建 ...

  6. laravel 实时facade

    实时facade 创建一个目录叫services 创建一个weibo类 <?php namespace App\Services; class weibo { protected $http; ...

  7. 003 rip

    r0#config t Enter configuration commands, one per line.  End with CNTL/Z. r0(config)#router rip r0(c ...

  8. VC,VB程序button、图标样式美化

    此处的"美化"指的不是通过代码进行美化你的程序.关于想进一步优化自己的程序界面的,最好还是去了解下SkinSharp吧.本文提及的是利用第三方资源编辑软件在不更改程序不论什么框架和 ...

  9. MongoDB Helper的简单封装

    db.properties #mongodb数据库配置文件 #数据库server所在的ip地址 ip=127.0.0.1  #mongodb服务port号 port=27017 #要连接的库 dbNa ...

  10. xode5.1.1设置IOS欢迎界面的方法

    先准备3张不同尺寸的欢迎图.文件名称分别为: Default.png  iPhone 320X480分辨率屏幕默认启动图片. Default@2x.png iPhone 640X960分辨率屏幕默认启 ...