不管接下来发生什么事,你都不能停止前进

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">

即可解决。

posted @ 2020-02-08 12:31  普罗旺斯_S  阅读(319)  评论(0编辑  收藏  举报