IDEA validates your XML according to the schema and correctly says that Element metadata-complete is not allowed here .
If you look at the web-app_3.0.xsd , you will see that it imports web-commmon_3.0.xsd . And this web-common schema defined metadata-complete as part of web-common-attributes .
<xsd:attributeGroup name="web-common-attributes"> <xsd:attribute name="version" type="javaee:web-app-versionType" use="required"/> <xsd:attribute name="id" type="xsd:ID"/> <xsd:attribute name="metadata-complete" type="xsd:boolean"> ...
In the end, this means that metadata-complete is an attribute before the web-app .
Change xml instead:
<?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" metadata-complete="false"> <display-name>Hello World</display-name> </web-app>
source share