问题描述:
导入项目发现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*)”.
解决方案:
第一种:
将上面的注释删掉 “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”
“http://java.sun.com/dtd/web-app_2_3.dtd” >
第二种:
严格按照(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.xml中的标签。
问题解决,希望对您有所帮助。
作者:康帝957
来源:CSDN
原文:https://blog.csdn.net/kangdi957/article/details/81504870
版权声明:本文为博主原创文章,转载请附上博文链接!