我的欢迎文件列表如下所示:
<welcome-file-list>
<welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
</welcome-file-list>
这会在 Eclipse 中引发以下警告:
CHKJ3010W: Welcome Files cannot begin or end with a /. in web.xml
如果我们删除 WEB-INF 前面的 /,则该页面在 JBoss 中无法正确提供。如果我们添加 / 我们会收到上述警告。
如何避免这个警告?