配置文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element filter

Posted cyy_13

tags:

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

 

配置文件filter元素报错
解决办法:
解决办法为:将“http://www.springmodules.org/schema/cache/springmodules-cache.xsd http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd”这段话加入到xml文件的"xmlns:xsi="的标签中

如下所示:
{

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
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/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
">

}

以上是关于配置文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element filter的主要内容,如果未能解决你的问题,请参考以下文章

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

java配置xml报cvc-complex-type.2.3: 元素 'beans' 必须不含字符 [子级], 因为该类型的内容类型为“仅元素”

关于dubbo服务的xml配置文件报错的问题

dubbo控制器xml文件报错

spring开启事务时启动报错SAXParseException

cvc-complex-type.2.3:Element ‘filter-mapping‘ cannot have character [children],because the type‘s co