zoukankan      html  css  js  c++  java
  • web.xml配置文件中<async-supported>true</async-supported>报错的解决方案

       在配置web.xml的时候总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉。 
       可以尝试以下两种解决方式:

       解决方法一:
              在eclipse中配置xml
             1、 http://www.springmodules.org/schema/cache/springmodules-cache.xsd
             2、http://www.springmodules.org/schema/cache/springmodules-ehcache.xsd 
               然后再将这两个xsd加入到web.xml中就搞定了 ,如下面代码:

        

       

          解决方法二:

            <async-supported>true</async-supported>是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">

         改成:

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

       即可解决。

  • 相关阅读:
    spring
    SpringMVC 配置与使用
    基本MVC2模式创建新闻网站
    EL表达式
    JavaBeans介绍
    JSP简介
    Cookie与Session的异同
    过滤器的使用
    session的使用
    最长回文子串
  • 原文地址:https://www.cnblogs.com/jedjia/p/web-async-supported.html
Copyright © 2011-2022 走看看