Eclipse web.xml Link file error

I imported the project into eclipse as a maven project - I updated the versions of web applications from 2.5 to 3.1 because it was imported as Dynamic web Module 3.1. Now I get the following error:

Errors below were detected while checking the file "web-app_3_1.xsd" through the file "web.xml". In most cases, these errors can be detected by directly checking "web-app_3_1.xsd". However, it is possible that errors will occur only when web-app_3_1.xsd is checked in the context of web.xml.

s4s-elt-character: characters without spaces are not allowed in schema elements other than xs: appinfo and xs: documentation. Saw 'var _U = "undefined";'

Matters Related:

The above 2 questions on SO point to the same problem, and the answers show that the namespace should be javaee, which is already the case:

<web-app version="3.1" 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_1.xsd">
+4
source share
1 answer

Try this in your web.xml, note that xmlnspoints tohttp://xmlns.jcp.org

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

Try deleting the entry in the web module from the org.eclipse.wst.common.project.facet.core.xml file. Save the file. Go to the Project Boundaries section and change it to Dynamic Web Module Version 3.1.

Example

+7
source

Source: https://habr.com/ru/post/1607081/


All Articles