Error Cvc-complex-type.2.4.a:invalid content is found starting with element ' async-supported '

Source: Internet
Author: User

Create a MAVEN project in Eclipse, integrate the SSM, and some other framework content more, Web.xml reported this error, there are small red fork, the solution:

In the first few lines of the web.xml, locate the "xmlns:xsi" tab, as follows:

Add two lines:

Http://www.springmodules.org/schema/cache/springmodules-cache.xsd       
http://www.springmodules.org/schema/ Cache/springmodules-ehcache.xsd "

Changed to read as follows:

<web-app xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance
        http://www.springmodules.org/schema/cache/ Springmodules-cache.xsd 
        

This will not be an error.

When you're done, Eclipse prompts a yellow exclamation mark on the first line of Web.xml, which reads:
No Grammar constraints (DTD or XML Schema) referenced in the document
To eliminate this yellow exclamation point, add the second line in Web.xml:

<! DOCTYPE xml>

After the change is done:

<?xml version= "1.0" encoding= "UTF-8"?>

And then I found a situation, I don't know if it's all that.

<?xml version= "1.0" encoding= "UTF-8"?>

This line must be in the first line of Web.xml, that is, the first line is empty, the second line starts with content, or there will be a small red fork, <?xml version= "1.0" encoding= "UTF-8"?> must appear in the first line of Web.xml.

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.