java如何避免CHKJ3010W:欢迎文件不能以/
我的欢迎文件列表如下所示:
<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中无法正常服务。如果我们添加了上述警告
如何避免这种警告
# 1 楼答案
您应该指定可公开访问的文件。看http://wiki.metawerx.net/wiki/Web.xml.WelcomeFileList
创建公共
index.jsp
,其中将包含来自/WEB-INF/jsp/index.jsp
的数据