一直没用,几天做一个小项目才发现 在web.xml中
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
welcome-file 只能配置静态页面,如果需要请求.do或者.action,可以在跳转后的静态页面中通过url跳转或jsp的forward跳转到action的地址。
如:<meta http-equiv='refresh' content='0;url=show.action'> 或者document.location.href="xxxx"或者<jsp:forward>
action是不能放在web.xml中,只能放在struts.xml中