web.xml配置文件中true报错的解决方案

Posted 普罗旺斯S

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web.xml配置文件中true报错的解决方案相关的知识,希望对你有一定的参考价值。

true报错的解决方案:

解决方法一:

1. 在eclipse中配置xml

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

2. 然后再将这两个xsd加入到web.xml中就搞定了 ,如下面代码:

解决方法二:

1. true是web.xml 3.0的新特性,只需将

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    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">

2. 改成:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    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_3_0.xsd" 
    id="WebApp_ID" version="3.0">

即可解决。

以上是关于web.xml配置文件中true报错的解决方案的主要内容,如果未能解决你的问题,请参考以下文章