Tomcat6和7版本对web.xml中taglib标签的配置差异
原来部署在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标签的配置差异的更多相关文章
- JSP/JSF从web.xml中取出context-param的配置信息
JSP/JSF从web.xml中取出context-param的配置信息. 应用场景:我们配置了项目的版本信息,想让他显示在页面上,如: <context-param><!-- ## ...
- web.xml 中<taglib>报错(转载)
在web.xml加入taglib <taglib> <taglib-uri>/WEB-INF/tiles.tld</taglib- uri> <taglib- ...
- web.xml中<welcome-file-list>标签不起作用
之前也都提到过,web.xml会通过<servlet>和<servlet-mapping>来确定url和指定contoller文件,乃至于jsp页面的联系. 但是有一个< ...
- web.xml中load-on-startup标签的含义
在servlet的配置当中,<load-on-startup>5</load-on-startup>的含义是: 标记容器是否在启动的时候就加载这个servlet. 当值为0或者 ...
- web.xml中同一servlet/filter配置多个url-pattern
转自:http://blog.sina.com.cn/s/blog_4c2c2a0c0100dh67.html 若你的servlet要多个地址,或你的filter需要过滤不同的url如有*.jsp,* ...
- web.xml的加载过程配置详解
一:web.xml加载过程 简单说一下,web.xml的加载过程.当我们启动一个WEB项目容器时,容器包括(JBoss,Tomcat等).首先会去读取web.xml配置文件里的配置,当这一步骤没有 ...
- web.xml中不同版本的servlet头以及版本控制
参考文章: http://www.cnblogs.com/beijingstruggle/p/5461146.html http://blog.csdn.net/z69183787/article/d ...
- 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& ...
- 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使用如下 ...
随机推荐
- js Date()日期函数浏览器兼容问题解决方法
一般 直接new Date() 是不会出现兼容性问题的,而 new Date(datetimeformatstring) 常常会出现浏览器兼容性问题,为什么,datetimeformatstring中 ...
- 用 字蛛 取出需要的字符应用字体 @font-face
一.安装font-spider npm install font-spider -g 二.目录结构 font-spider font FZZZHONGHJW.ttf font.html 三.font. ...
- JAVA生成扫描条形码
条形码是一种可视化.机器可读的数据,这些数据通常描述了携带该条码的物品的相关信息.条形码已经广泛被应用在商品流通,图书管理,邮政管理和银行系统等领域.在这篇文章中,将介绍如何生成和扫描一些常见的一维和 ...
- SQL Server转sqlite数据库
下载地址:http://files.cnblogs.com/jason-davis/SQL_Server_To_SQLite_DB_Converter_bin.zip 下载地址:http://file ...
- centos部署jenkins
1. 实验环境: 操作系统: CentOS Linux release 7.2.1511 (Core) 软件版本: jdk-8u60-linux-x64 apache-tomcat-9.0. ...
- Guava ---- EventBus事件驱动模型
在软件开发过程中, 难免有信息的共享或者对象间的协作. 怎样让对象间信息共享高效, 而且耦合性低. 这是一个难题. 而耦合性高将带来编码改动牵一发而动全身的连锁效应. Spring的风靡正是由于攻克了 ...
- Zend Studio配置Xdebug
按照网上的教程一直没有配置好,上官网看到一句话, If you don't know which one you need, please refer to the custom installati ...
- Android合并两个APP的详细做法(掌握)
有时候因公司需求,要求合并两个APP 使用里面的功能. 平台:Studio 小白鼠:二维码扫描 和自己项目 详细步骤: /** * 1.将解压后的android/assets目录复制到项目中的mai ...
- HDU 5979 Convex【计算几何】 (2016ACM/ICPC亚洲区大连站)
Convex Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Subm ...
- (转)web会话管理方式
阅读目录 1. 基于server端session的管理 2. cookie-based的管理方式 3. token-based的管理方式 4. 安全问题 5. 总结 http是无状态的,一次请求结束, ...