When you are programming Java WEB, you need to configure Web. XML, but sometimes the following error message appears:
The content of element type "Web-app" must match "(icon?,display-name?,description?,distributable?,context-param*, Filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?, error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*, env-entry*,ejb-ref*,ejb-local-ref*) ". -No grammar constraints (DTD or XML Schema) detected for the document.
Cause: The Document Content label order does not conform to the WEB-APP_2_3.DTD specification
Workaround: 1. Check that the order of the labels is written in the order of the labels in the error prompt, and adjust the order of labels in the order in which they are prompted.
2. Or directly delete the Web. XML Header configuration: <! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">
Workaround for <web-app> error hints in Web. xml