The top of my web.xml
file looks like this:
If you have the same (missleading) error message because your XML Editor was not finding the XSD file, you can add a catalog entry.
You pick the URL specified for the schema, for a declaration like
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
The URL of the schema file (http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd) is specified for the namespace http://java.sun.com/xml/ns/j2ee. You can now redirect the location of the file with the workspace catalog in Eclipse:
Preferences -> XML -> XML Catalog -> Add..
Use
Key Type = Schema Location
Key = http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd
And then you can use the file chooser to pick actually a XSD file on the filesystem or the workspace.