Element web app must be declared

I checked out this project from svn repository in IDEA and the web.xml xsd looks like this:

<web-app id="data-fabric-web-tool" version="2.5"
     xmlns="http://java.sun.com/xml/ns/j2ee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
     http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

      

The very first error I see is "Element Web App". Also I get a "cannot resolve character" error for every tag in the file.

+3


source to share


1 answer


In accordance with:

All Java EE 7 schemas and new deployment descriptors share a namespace http://xmlns.jcp.org/xml/ns/javaee



Try defining the descriptor namespace:

<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" id="data-fabric-web-tool">
</web-app>

      

+7


source







All Articles