How to open the web.xml in the project
Since some projects do not have web.xml after creation, they must be manually clicked to display
- First right click on the project and select Java EE Toks
- Next, select d and click on the second Generate Deployment Descriptor Stub
- Finally, reopening WEB-INF will refresh the web.xml.
web.xml file error problem
When configuring the web.xml in the project, I encountered the following error, roughly translated as follows: "The identity constraint "web-common-servlet-name-uniqueness" field matches the element "web-app", but the element does not have Simple type."
Solution
Change the java in the above xmlns="http://java.sun.com/xml/ns/javaee " to uppercase , as follows: xmlns=" http://java.sun.com/xml/ns/javaee " , the error message of the web.xml file is gone, and it can run normally! Screenshot below: