Eclipse complaining about web-app attributes

Remove the DOCTYPE line, that is what the xsd is meant to replace. I had the same issue and only this had worked.


I had the same problem. I tried a different schema location and it worked for me. Instead of

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"

try using this

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd

Also, set the version as "3.0".


Try to put in this way:

<web-app  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_4.xsd"   version="2.4" >

Eclipse validator is very strict with the order.