web.xml中报错异常

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/DouBoomFly/article/details/70200740

错误异常:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of 

 '{"http://java.sun.com/xml/ns/javaee":init-param}' is expected.


<async-supported>true</async-supported> 


解决方案:

xmlns中再加两行

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


如:

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

展开阅读全文

没有更多推荐了,返回首页