我是靠谱客的博主 拼搏仙人掌,这篇文章主要介绍web.xml配置报The content of element type “web-app“ must match错误解决,现在分享给大家,希望可以做个参考。

1、问题,配置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*)".

2、原因是因为web.xml头部配置了如下信息

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

文档配置内容标签顺序不符合web-app_2_3.dtd规范

3、解决方式

     1):删除<!DOCTYPE…………>这几行内容

     2):按照错误提示信息中的标签顺序调整web.xml中标签的顺序(推荐)

最后

以上就是拼搏仙人掌最近收集整理的关于web.xml配置报The content of element type “web-app“ must match错误解决的全部内容,更多相关web.xml配置报The内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(117)

评论列表共有 0 条评论

立即
投稿
返回
顶部