web.xml 中async-supported爆红叉叉 cvc-complex-type.2.4.a: Invalid content was found starting with element

Posted 一个西郊小伙子

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web.xml 中async-supported爆红叉叉 cvc-complex-type.2.4.a: Invalid content was found starting with element相关的知识,希望对你有一定的参考价值。

新建一个项目在web.xml中些东西是发现async-supported报红叉 

cvc-complex-type.2.4.a: Invalid content was found starting with element ‘async-supported‘.

找了好多终于发现了把表头修改一下就行了,这是一个简单的解决方法;

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
http://www.springmodules.org/schema/cache/springmodules-cache.xsd
http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">这里边是在原来表头基础上加了这些东西,

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





以上是关于web.xml 中async-supported爆红叉叉 cvc-complex-type.2.4.a: Invalid content was found starting with element的主要内容,如果未能解决你的问题,请参考以下文章

Spring异步功能

web.xml文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param&

cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. O

必须在Servlet上启用异步支持,并为异步请求处理中涉及的所有过滤器启用

web.xml

JAVA web.xml中引用多个XML