项目启动报 Attribute "xmlns" was already specified for element "web-app".

         项目启动报:

         Parse Fatal Error at line 2 column 193: Attribute "xmlns" was already specified for element "web-app".

         org.xml.sax.SAXParseException: Attribute "xmlns" was already specified for element "web-app".

         解决办法:

         web.xml 配置有错误,项目名称重命名了,

         web.xml中重新又生成了句 xmlns:web="http://java.sun.com/xml/ns/javaee" 删除

         原来的xmlns:web="http://java.sun.com/xml/ns/javaee" 加上 web-app_2_5.xsd 就OK了!

         web.xml 如下:

        <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/web-app_2_5.xsd" 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">

相关推荐