原文地址:https://blog.csdn.net/sdmxdzb/article/details/47728017?locationNum=11

今天在搞工作流,tomcat7.0.57 总是报错,解析不了web.xml引用的joa.xml .

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
                [<!ENTITY joa SYSTEM  "joa.xml">]>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">

后经查找资料发现:

tomcat 7.0.52开始的版本才会出这个问题,

是因为安全的考虑tomcat 7.0.52开始的版本把xmlBlockExterna属性默认为false,要解决这个问题,

两种方法:

1、把tomcat版本换成7.0.52之前的版本。

2、把xmlBlockExterna设成false。
下面是原版解释:
As per discussion with Tomcat developers, xmlBlockExternal="false" attribute of Tomcat's Context (context.xml) was set true by default starting from 7.0.52. With xmlBlockExternal="false"generated/djn-settings.conf can be included。

<Context  xmlBlockExternal="false" >

<!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

<!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

解决完这个问题后,又出现了一个新问题:

之后查找资料解决方法:
在项目下创建org.apache:

package org.apache;

import java.lang.reflect.InvocationTargetException;
import javax.naming.NamingException;

/**
 * @author 董志博
 * @date  2015-8-17
 * @description
 * @Version 1.0
 */
public interface AnnotationProcessor {
    
    
      public void postConstruct(Object instance) throws IllegalAccessException,
      InvocationTargetException;

public void preDestroy(Object instance) throws IllegalAccessException,
          InvocationTargetException;
    
      public void processAnnotations(Object instance)
          throws IllegalAccessException, InvocationTargetException,
          NamingException;

}

由于时间问题,还未了解原因。待续.......
————————————————
版权声明:本文为CSDN博主「无怨_无悔」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/sdmxdzb/article/details/47728017

web.xml引入 xml (tomcat 7.0.52) 以上版本报错的更多相关文章

  1. Android 6.0以后的版本报错:open failed: EACCES (Permission denied)

    Android 6.0以后的版本报错:open failed: EACCES (Permission denied) 在开发项目中,遇见要进行文件操作,遇见Caused by: android.sys ...

  2. Vmware9.0打开早期版本报错:this virtual machine’s policies are too old to be run by this version of vmware workstation”

    VMWare从6.0升级到9.0,打开以前的虚拟机报错如下: “this virtual machine’s policies are too old to be run by this versio ...

  3. 【Egret】web版本报错:XMLHttpRequest cannot load

    [Egret] web发行版本报错:XMLHttpRequest cannot load file:///C:/Users/PX/Documents/EgretProjects/Xt1/resourc ...

  4. Eclipse4.9集成Tomcat 9.0.21详细版

    1.下载Tomcat 从Tomcat官网下载:https://tomcat.apache.org 此处我下载的版本是Tomcat 7.0.94 下载完毕后解压即可,我解压后的路径是D:\soft\ap ...

  5. tomcat 7.0 免安装版配置

    转载请注明出处,欢迎邮件交流:1057449102@qq.com 注意:tomcat 运行是依赖jdk的,前提是要安装了jdk,配置好. 1.把下载好的 apache-tomcat-7.0.85.zi ...

  6. navicat连接mysql8.0+版本报错2059

    ERROR 2059 : Authentication plugin 'caching_sha2_password' cannot be loaded 问题: 连接Docker启动的mysql出现:E ...

  7. tomcat 8.0 进程没有全部杀死

    The web application [FileIO_new_interface] created a ThreadLocal with key of type [java.lang.ThreadL ...

  8. eclipse中基于maven构建的web项目pom.xml中指定的jar包无法发布到tomcat中

    eclipse运行maven web项目报错: 信息: Starting Servlet Engine: Apache Tomcat/7.0.57 一月 07, 2015 11:50:44 下午 or ...

  9. Tomcat 8.0的并发优化 - 优化server.xml的配置

    目录 1 Tomcat的3种运行模式 1.1 BIO - 同步阻塞IO模式 1.2 NIO - 同步非阻塞IO模式 1.3 APR - 可移植运行时模式 2 Tomcat的并发配置(配置Connect ...

随机推荐

  1. python接口自动化8-unittest框架使用

    前言 unittest:Python单元测试框架,基于Erich Gamma的JUnit和Kent Beck的sSmalltalk测试框架. 一.unittest框架基本使用 unittest需要注意 ...

  2. Java 异常面试问题与解答

    Java 提供了一种健壮且面向对象的方法来处理称为 Java异常处理的异常情况. 1. Java中的异常是什么? 异常是在程序执行期间可能发生的错误事件,它会破坏其正常流程.异常可能源于各种情况,例如 ...

  3. 基于python的selenium常用操作方法(2)

    9 多表单切换 在Web应用中经常会遇到frame/iframe表单嵌套页面的应用,WebDriver只能在一个页面上对元素识别与定位,对于frame/iframe表单内嵌页面上的元素无法直接定位.这 ...

  4. 【CF1172E】Nauuo and ODT(Link-Cut Tree)

    [CF1172E]Nauuo and ODT(Link-Cut Tree) 题面 CF 给你一棵树,每个节点有一个颜色. 定义一条路径的权值为路径上不同颜色的数量.求所有有向路径的权值和. 有\(m\ ...

  5. centos7开启,关闭防火墙

    1.查看防火墙状态 firewall-cmd --state 2.停止防火墙 systemctl stop firewalld.service 3.禁止防火墙开机启动 systemctl disabl ...

  6. TreeViewItem节点添加图标后再加header

    1.需要实现的效果如图 2.解决方案 1).给TreeViewItem中添加children,children为包含一个stackpanel,在stackpanel中包含Image和TextBlock ...

  7. python IPy库

    Website: https://github.com/haypo/python-ipy/ 安装: easy_install IPy   >>> from IPy import IP ...

  8. go-GUI-代码

    直接看网址吧,所有的GO-GUI代码!~~~~ 网址

  9. go-goroutine 和 channel

    goroutine 和 channel goroutine-看一个需求 需求:要求统计 1-9000000000 的数字中,哪些是素数? 分析思路: 1) 传统的方法,就是使用一个循环,循环的判断各个 ...

  10. [转]Outlook VBA自动处理邮件

    本文转自:https://blog.csdn.net/hnwyllmm/article/details/44874331 需求描述公司里面每天都会有很多邮件,三分之一都是不需要看的,Outlook的过 ...