Eclipse报错:Attribute "xmlns" was already specified for element "web-app".

Posted Tomorrow

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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"

 

解决方法:

删掉一个即可。




以上是关于Eclipse报错:Attribute "xmlns" was already specified for element "web-app".的主要内容,如果未能解决你的问题,请参考以下文章

用eclipse编写jsp 高手帮个忙 总是The value for the useBean class attribute wjj.user is invalid.

Spring Boot 2.1.7 启动项目失败,报错: "Failed to configure a DataSource: 'url' attribute is not

python报错提示AttributeError: 'QString' object has no attribute 'startswith'

python3爬取网页,报错AttributeError: 'NoneType' object has no attribute 'xpath'?

pyqt5 报错AttributeError: 'MyWindow' object has no attribute 'config_ui'?

在eclipse 中运行scala程序 报错如下: