针对web.xml报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'location'.的解决办法

在写java项目,配置web.xml文件的时,出现以下错误:

DescriptionResourcePathLocationType cvc-complex-type.2.4.a: Invalid content was found starting with element 'location'.

 

百思不得其解,只好百度,终于解决了,但是还是不知道其原理,这里这是奉上解决方法。如果有大神知道原理,还望告知,非常感谢!

 

解决办法:将“http://www.springmodules.org/schema/cache/springmodules-cache.xsd http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd”这段话加入到xml文件的"xmlns:xsi="的属性中,即可解决(示例如下)



  

 

你可能感兴趣的:(JavaWeb,JAVA,java报错)