Eclipse web.xml "Referenced file contains errors" [duplicate]
Asked Answered
F

1

2
"<?xml version="1.0" encoding="UTF-8"?>"

In this I'm getting error in this line

Description Resource Path Location Type Referenced file contains errors (jar:file:/C:/Softwares/eclipse-jee-2023-09-R-win32-x86_64/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.600.v202307260543.jar!/dtdsAndSchemas/jakartaee_10.xsd). For more information, right click on the message in the Problems View and select "Show Details...

like this.

And the full Web.xml File is

Please help me to fix this issue

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://jakarta.ee/xml/ns/jakartaee"
    xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
    id="WebApp_ID" version="6.0">
    <display-name>Abc</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.jsp</welcome-file>
        <welcome-file>default.htm</welcome-file>
    </welcome-file-list>
</web-app>

Error here

Farr answered 25/10, 2023 at 16:41 Comment(1)
No, this is not my friend but we are facing same issue.Farr
Y
1

I had the same error. After lots of googling, disabling validations, trying to update Eclipse (as the XSD was contained in a Eclipse JAR file) ... the solution was simple (in retrospective). Just validate the web.xml file. Right click on the file and find the Validate option.

enter image description here

After the validation has been completed the 'error' is gone.

enter image description here

I have done both Project > Clean, Maven > Update and restarted Eclipse (which for other 'solutions' took the error back) and the error is gone.

Yasminyasmine answered 24/2 at 20:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.