web.xml配置顺序

web.xml配置过程中出现了配置顺序问题,在<web-app>左侧总是有红色警告
但是程序仍然启动正常 ,没有报异常。

如图:

web.xml配置顺序_第1张图片
将光标移动上去显示如下内容:
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)