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*)”.
No grammar constraints (DTD or XML schema) detected for the document.
解决办法
途中报错提示的信息就是说web-app中的配件顺序不对,所以我们就按照它所提示的信息来,从上到下依次是
- icon
- display-name
- desciption
- distributable
- context-param
- filter
- filter-mapping
- listenter
- servlet
- servlet- mapping
- session-config
…以下我就不一一例举了,自己可以参照上述信息,更改web-app范围内的配置顺序即可
如图,我的更改后如下