Home > other >  XML Problem in Eclipse in web-app attribute
XML Problem in Eclipse in web-app attribute

Time:11-23

Hey I am creating a new dynamic web project in eclipse that using jdk 11. The problem is it giving me error in regards to my web-app attribute, btw I have try to use version 2.4 and 3.0 but both having the same errors.

my code:

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

The 2 error involves:

  1. cvc-attribute.3: The value '2.5' of attribute 'version' on element 'web-app' is not valid with respect to its type, 'web-app-versionType'.
  2. cvc-enumeration-valid: Value '2.5' is not facet-valid with respect to enumeration '[2.4]'. It must be a value from the enumeration.

Help me to solve this!!! T.T Thanks in advance.

CodePudding user response:

Should be resolved in 2021-12 with bug 574177.

  • Related