导入工程,eclipse中报错:
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和servlet-mapping交叉出现或者filter和filter-mapping交叉
解决方法有两种:
1.调整web.xml中节点顺序,先servlet再servlet-mapping(filter同理)
2.关闭eclipse中xml校验,步骤:Windows-Preference-Validation,disable all,apply再OK