在web.xml文件中通常我们设置一个站点的首页多为网站第一根目录下的index.jsp或者index.htm之类,例如:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
2: *.action 的首页设置
首先设置web.xml默认首页为某action:
<welcome-file-list>
<welcome-file>index.action</welcome-file>
</welcome-file-list>
关键的地方: 需要在目录下新建一个同名文件, 例如 index.action
这样才能生效,以前一直设置不成功,都用 jsp 二次跳转的。![](http://my.oschina.net/js/ke/plugins/emoticons/images/1.gif)