在2.5版本里,添加springmvc配置文件时,报错
cvc-complex-type.2.4.a: Invalid content was found starting with element(servlet)

解决方法:

将“http://www.springmodules.org/schema/cache/springmodules-cache.xsd
http://www.springmodules.org/sch ... modules-ehcache.xsd
这段话加入到xml文件的"xmlns:xsi="的标签中

  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"  
  3.     xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance  
  4.                http://www.springmodules.org/schema/cache/springmodulescache.xsd
  5.                http://www.springmodules.org/schema/cache/springmodulesehcache.xsd"   
  6.           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   
  7.     http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd       ">  
复制代码



标签: 暂无标签
iidba

写了 218 篇文章,拥有财富 2860,被 235 人关注

转播转播 分享分享 分享淘帖
回复

使用道具

成为第一个吐槽的人

您需要登录后才可以回帖 登录 | 加入社区

本版积分规则

意见
反馈