在eclipse中web.xml報錯:cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-su
阿新 • • 發佈:2018-12-15
在eclipse中web.xml報錯:cvc-complex-type.2.4.a: Invalid content was found starting with element ‘async-supported’
在配置web.xml的時候出現cvc-complex-type.2.4.a: Invalid content was found starting with element錯誤,這個錯誤的引起原因暫時還不明,包括解決辦法也不清楚原理,待後續補充。 目前已知的解決辦法有三種:
- 最簡單的方法,在”前加空格,且在儲存過報錯消失之後刪除空格,依然有效,不會報錯。
- 修改擡標頭檔案
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 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">