问题描述:

导入项目发现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.xml文件配置servlet时web-app标签报错
解决方案:

第一种:
将上面的注释删掉 “-//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
版权声明:本文为博主原创文章,转载请附上博文链接!

相关文章:

  • 2021-07-11
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-06-29
  • 2021-05-21
猜你喜欢
  • 2021-10-10
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2021-06-20
相关资源
相似解决方案