嘿,我正在 eclipse 中創建一個使用 jdk 11 的新動態 web 專案。問題是它給了我關于 web-app 屬性的錯誤,順便說一句,我嘗試使用 2.4 和 3.0 版,但兩者都有相同的錯誤。
我的代碼:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Lasb5Exercise</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
2 錯誤涉及:
- cvc-attribute.3:元素“web-app”上的屬性“version”的值“2.5”對于其型別“web-app-versionType”無效。
- cvc-enumeration-valid:值“2.5”對于列舉“[2.4]”不是方面有效的。它必須是列舉中的值。
幫我解決這個問題!!!TT 提前致謝。
uj5u.com熱心網友回復:
應該在 2021-12 解決,錯誤574177。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/364936.html
