---
title: "登录首页实现跳转"
author: "xredman"
date: "2010-11-26T15:24:11Z"
tags: []
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2010-11-26T15:24:11Z"
id: 825560
url: "https://xredman.iteye.com/blog/825560"
---

在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" />
```