ITeye博客

登录首页实现跳转

xredman · 2010-11-26 15:24 · Web前端 · Markdown

在Javaweb项目中,默认的首页一般会是index.html、index.jsp等等,在web.xml中通常会有以下配置

	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

 这里指定了默认的首页,不过这样就没有经过Struts2去取得后台数据,如果欲取到后台数据,可以在进入首页是发出一个Request请求,HTML中的做法是刷新网页,然后定位。

<meta http-equiv="refresh" content="3;url=Menu.action" />

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。