Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

element web-app must be declared

I checked out this project from svn repository into 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" must be declared. Also I am getting "cannot resolve symbol" error for every tag in the file.

like image 365
joshras Avatar asked Feb 11 '23 03:02

joshras


1 Answers

According to:

  • Java EE: XML Schemas for Java EE Deployment Descriptors
  • Java EE 7 Deployment Descriptors
  • Java EE 7 Schema Namespace Moving to jcp.org

All Java EE 7 and newer Deployment Descriptor Schemas share the namespace http://xmlns.jcp.org/xml/ns/javaee

Try this descriptor namespace definition:

<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>
like image 128
Alex Bitek Avatar answered Mar 08 '23 19:03

Alex Bitek