web.xml中 web-app 报错了--The content of element type "web-app" must match

web.xml中<web-app>报错了--The content of element type "web-app" must match。真是活见鬼!

web.xml中 web-app 报错了--The content of element type "web-app" must match

查完资料后发现,原来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*)

得,用人家的东西就按照人家的规矩来,把filter配置放到servlet前面后错误消失,够狠!

web.xml中 web-app 报错了--The content of element type "web-app" must match

用你的东西就要听你的,不用你的东西你就管不到了吧,索性把你给删了,发现也行。

web.xml中 web-app 报错了--The content of element type "web-app" must match