一直没用,几天做一个小项目才发现 在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中
本文探讨了在web.xml文件中配置welcome-file的作用及其限制,同时介绍了如何在需要请求.do或.action时通过url跳转或jsp的forward实现,强调了Action配置应在Struts.xml文件中的实践。
1038

被折叠的 条评论
为什么被折叠?



