我是靠谱客的博主 高兴寒风,这篇文章主要介绍The content of element type “web-app“ must match “(icon?,display-name?,description?,报错解决方案,现在分享给大家,希望可以做个参考。
在web.xml文件配置时报如下错误:
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*)”.
原因:文档内容标签顺序不符合web-app_2_3.dtd规范
解决方案 一:
1:严格按照提示上的顺序排列
2:删除<!DOCTYPE 。。。。这段内容
解决方案 一:
我始终觉得删除总归是不好的,于是发现第二种解决方案,将下面的代码替换第5行(包括第5行)之前的代码就行。
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
最后
以上就是高兴寒风最近收集整理的关于The content of element type “web-app“ must match “(icon?,display-name?,description?,报错解决方案的全部内容,更多相关The内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复