加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cvc-complex-type.2.4.a: Invalid content was found starting w

发布时间:2020-12-16 08:21:51 所属栏目:百科 来源:网络整理
导读:cvc-complex-type.2.4.a: Invalid content was found starting with element 在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误. 解决方法如下: 在eclipse中配置xmlcatalog 1、Location: D:LIBspr

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


在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误.



解决方法如下:

在eclipse中配置xmlcatalog


1、Location: D:LIBspringmodules-cache.xsd(springmodules-cache.xsd在本地的路径)
Key Type: Namespace Name
Key: http://www.springmodules.org/schema/cache/springmodules-cache.xsd
2、Location: D:LIBspringmodules-ehcache.xsd(本地路径)
Key Type: Schema Location
Key: http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd


以上两个配置文件下载配置文件 (http://download.csdn.net/detail/pplsunny/9764322)



然后再将这连个xsd加入到web.xml中就搞定了

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 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" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
id="WebApp_ID" 
version="2.5">


==============

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读