Web. Xml introduced (Tomcat 7.0.52) above version of this report wrong!

Source: Internet
Author: User

Today in the work flow, tomcat7.0.57 always error, parse the Web. XML Reference 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" >

After finding the data found:

Tomcat 7.0.52 The beginning of the version before this problem,

is because of the security considerations Tomcat 7.0.52 The beginning of the version of the Xmlblockexterna property defaults to False, to solve this problem,

Two methods:

1. Replace the Tomcat version with the previous version of 7.0.52.

2, set the Xmlblockexterna to False.
The following is the original explanation:
as per discussion with Tomcat developers, xmlblockexternal= "false" attribute of Tomcat ' s context (context . xml) is set true by default starting from 7.0.52. With xmlblockexternal= "false" generated/djn-settings.conf can is 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>

After solving this problem, a new problem arises:

TOMCAT7 start error: caused By:java.lang.noclassdeffounderror:lorg/apache/annotationprocessor, then find the data solution:

Create a Org.apache under the project:

Package Org.apache;

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

/**
 * @author Dong Zhibo
 * @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;

}


Due to time problems, the reason is not yet known. Cond.......

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Web. Xml introduced (Tomcat 7.0.52) above version of this report wrong!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.