---
title: "通过Struts2的action校验后跳转页面样例"
author: "wuyoubf"
date: "2010-05-04T22:53:48Z"
tags: ["HTML", "JSP", "Java", "框架"]
categories: ["企业架构"]
slug: "struts2-action"
draft: false
lastmod: "2010-05-04T22:55:48Z"
id: 659098
url: "https://wuyoubf.iteye.com/blog/659098"
---

login.jsp通过Struts2的action校验后跳转到main.jsp，main.jsp是个框架页，样例如下：

```
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
</head>
<frameset rows="63,*,23" frameborder="no" border="0" framespacing="0">
  	<frame src="<%= path %>/sys/top.jsp" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
  	<frame src="<%= path %>/sys/center.jsp" name="mainFrame" id="mainFrame" />
  	<frame src="<%= path %>/sys/down.jsp" name="bottomFrame" scrolling="No" noresize="noresize" id="bottomFrame" />
</frameset>
</html>
```