web.xml中提示错误The content of element type "web-app" must match

来源:互联网 发布:中国地图标注软件 编辑:程序博客网 时间:2024/05/16 15:40


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中<web-app>标签的元素个数和排序规则是有限制的,大多数情况下出现该错误的原因是元素排放顺序有误,解决其实也很简单,按照上面的描述将各元素排序即可。排序方式记不住没关系,常用的几个可以发现排序的规律,貌似和首字母相关的样子。按照首字母进行排序还有错误就严格的对照上面的提醒中的顺序就可以了。


0 0
原创粉丝点击