错误描述

在jsp页面引入了自定义的TLD文件的时候,碰到了一个错误

Invalid tld file: "/WEB-INF/tags/xxxt.tld", see JSP 2.2 specification section 7.3.1 for more details

错误原因

不符合 JSP2.2 中对tags的规定。

规定说的是这个:

In the jsp-2_2

JSP.7.3.1 Identifying Tag Library Descriptors Tag library descriptor files have names that use the extension .tld, and the extension indicates a tag library descriptor file. When deployed inside a JAR file, the tag library descriptor files must be in the META-INF directory, or a subdirectory of it. When deployed directly into a web application, the tag library descriptor files must always be in the WEB-INF directory, or some subdirectory of it. TLD files should not be placed in /WEB-INF/classes or /WEB-INF/lib, and must not be placed inside /WEB-INF/tags or a subdirectory of it, unless named implicit.tld and intended to configure an implicit tag library with its JSP version and tlib-version.

the .tld file can't be in classes , lib ,tags folder or subfolder.

意思是说,如果你使用的是jsp2.2就不能把tld文件放在 /WEB-INF/tags 以及其子目录下。

jsp版本和tomcat的版本是相关的。jsp版本和tomcat的版本对应关系如下:

Servlet Spec JSP Spec EL Spec WebSocket Spec JASPIC Spec Apache Tomcat Version Latest Released Version Supported Java Versions
4.0 2.3 3.0 1.1 1.1 9.0.x 9.0.1 (beta) 8 and later
3.1 2.3 3.0 1.1 1.1 8.5.x 8.5.23 7 and later
3.1 2.3 3.0 1.1 N/A 8.0.x (superseded) 8.0.47 (superseded) 7 and later
3.0 2.2 2.2 1.1 N/A 7.0.x 7.0.82 6 and later(7 and later for WebSocket)
2.5 2.1 2.1 N/A N/A 6.0.x (archived) 6.0.53 (archived) 5 and later
2.4 2.0 N/A N/A N/A 5.5.x (archived) 5.5.36 (archived) 1.4 and later
2.3 1.2 N/A N/A N/A 4.1.x (archived) 4.1.40 (archived) 1.3 and later
2.2 1.1 N/A N/A N/A 3.3.x (archived) 3.3.2 (archived) 1.1 and later

详情可查看:http://tomcat.apache.org/whichversion.html

解决办法

1.如果你的tld文件放在 /WEB-INF/tags目录下,而你不想改代码,那么,把tomcat换成apache-tomcat-7.0.55 或者以下的版本。(亲测可行)

2.如果你不想换tomcat就把 tld放在 /WEB-INF下。

Invalid tld file: "/WEB-INF/tags/xxxt.tld", see JSP 2.2 specification section 7.3.1 for more details的更多相关文章

  1. 执行打的maven jar包时出现“Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes”

    Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for ...

  2. Unity: Invalid serialized file version xxx Expected version: 5.3.4f1. Actual version: 5.3.5f1.

    Unity发布安卓项目,如果直接使用Unity打包APK一切Ok,导出Google项目 使用Idea打包 一进去直接Crash. 报错: 1978-2010/? E/Unity﹕ Invalid se ...

  3. WebViewer报错Error loading document: Invalid XOD file: Zip end header data is wrong size!

    错误:Error loading document: Invalid XOD file: Zip end header data is wrong size! 解决:https://groups.go ...

  4. Meth | phpstorm invalid descendent file name

     Failed to collect files: Invalid descendent file name "codelog_ddz.\"(]))\",\').txt& ...

  5. Invalid signature file digest for Manifest main attributes

    Solving a Spark error: Invalid signature file digest for Manifest main attributes When using spark-s ...

  6. 解决 Invalid signature file digest for Manifest 问题

    idea打包的jar文件在spark执行是报错: Invalid signature file digest for Manifest 通过以下命令解决: zip -d myjob.jar META- ...

  7. 解决错误:This bundle is invalid - The file extension must be .zip

    近期在 iOS 开发中遇到了一个很蛋疼的问题,Xcode 工程中接入了iMessage 壁纸的功能后,每次上传 ipa 包都会显示此包无效,并报上述的错误描述:This bundle is inval ...

  8. Intellij打包jar文件,“java.lang.SecurityException: Invalid signature file digest for Manifest main attrib

    下面是使用Intellij 打包jar文件的步骤,之后会有运行jar文件时遇到的错误. 打包完成. ================================================== ...

  9. “Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windows XP Professional.vmx" was created by a VMware product

    “Invalid configuration file. File "I:/My Virtual Machines/Windows XP english Professional/Windo ...

随机推荐

  1. 打开mac上面的apache 服务器

    1. apache 服务器在系统安装的时候就默认安装了 config 文件未知:  /etc/apache2/httpd.conf 2. 编辑配置文件 httpd.conf 2.1 查找  Docum ...

  2. 【JVM】类加载机制

    原文:[深入Java虚拟机]之四:类加载机制 类从被加载到虚拟机内存中开始,到卸载出内存为止,它的整个生命周期包括:加载.验证.准备.解析.初始化.使用和卸载七个阶段.它们开始的顺序如下图所示: 类加 ...

  3. zkclient中包引用不对,导致NoSuchMethodError

    nidonglin commented on 31 Oct 2014 Exception in thread "main" java.lang.NoSuchMethodError: ...

  4. django系列8:优化vote页面,使用通用视图降低代码冗余

    修改detail.html,将它变为一个可用的投票页面 <h1>{{ question.question_text }}</h1> {% if error_message %} ...

  5. halcon+WinForm显示rgb图并灰度化

    1.halcon代码,并导出成C# read_image (Demo, 'C:/Users/user/Pictures/demo.jpg') dev_display (Demo) rgb1_to_gr ...

  6. 2017-12-19python全栈9期第四天第二节之列表的增删查改之按索引改和按切片改

    #!/user/bin/python# -*- coding:utf-8 -*-li = ['zs','ls','ww','zl','xx']li[0] = 'cxvb' #按索引位置print(li ...

  7. lcd驱动框架

    目录 lcd驱动框架 框图 程序分析 入口 打开open 读read 初始化registered_fb 注册 小结 程序设计 测试 方式一操作fb0 方式二操作tty 方式三操作终端 完整程序 tit ...

  8. crm 动态一级二级菜单

    之前代码菜单是写是的 如何 让他 动态 生成了  首先 添加 2个字段 admin.py 更改 显示 from django.contrib import admin from rbac import ...

  9. jQuery使用(十四):extend()方法

    浅层克隆 深层克隆 扩展方法 一.extend的基本使用 语法: $.extend( target [, object1 ] [, objectN ] ) $.extend( [deep ], tar ...

  10. DirectX11 With Windows SDK--20 硬件实例化与视锥体裁剪

    前言 这一章将了解如何在DirectX 11利用硬件实例化技术高效地绘制重复的物体,以及使用视锥体裁剪技术提前将位于视锥体外的物体进行排除. 在此之前需要额外了解的章节如下: 章节回顾 18 使用Di ...