【问题标题】:XML Problem in Eclipse in web-app attributeEclipse 中 web-app 属性中的 XML 问题
【发布时间】:2021-12-31 18:52:02
【问题描述】:

嘿,我正在使用 jdk 11 在 Eclipse 中创建一个新的动态 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个错误涉及:

  1. cvc-attribute.3:元素“web-app”上属性“version”的值“2.5”相对于其类型“web-app-versionType”无效。
  2. cvc-enumeration-valid:值 '2.5' 对于枚举 '[2.4]' 不是 facet-valid。它必须是来自枚举的值。

帮我解决这个问题!!! T.T 提前致谢。

【问题讨论】:

    标签: xml eclipse jakarta-ee


    【解决方案1】:

    应该在 2021-12 年解决错误 574177

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-11
      • 1970-01-01
      • 2014-09-18
      • 1970-01-01
      相关资源
      最近更新 更多