Eclipse报错:Attribute "xmlns" was already specified for element "web-app".
原因:
在Eclipse中修改了已有的Web工程的工程名,然后出现该错误。
Attribute "xmlns" was already specified for element "web-app".
检查web.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
确实是出现了两次:xmlns="http://java.sun.com/xml/ns/javaee"
解决方法:
删掉一个即可。