struts2首页跳转后执行action
来源:互联网 发布:新三国知乎 编辑:程序博客网 时间:2024/05/11 17:42
jsp文件:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link rel="stylesheet" type="text/css" href="front/css/blog.css">
</head>
<body>
<jsp:forward page="indexBlog.action"></jsp:forward>
<div style="margin: 0 auto; height: 30px; width: 30px;">Loading.....</div>
</body>
</html>
配置web.xml文件:
第一步:
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern >/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
第二步:
<jsp:forward page="index.action"></jsp:forward> 首页跳转语句
- struts2首页跳转后执行action
- struts2当前Action执行成功后跳转到另一个Action
- struts2当前Action执行成功后跳转到另一个Action
- struts2当前Action执行成功后跳转到另一个Action
- Struts2 action跳转及重复执行
- struts2[杂记] action跳转action
- Struts2 Action中跳转Action
- Struts2 Action中跳转Action
- struts2 action跳转到action
- struts2 action跳转指向action
- Struts2 首页action/controller配置
- struts2 action 之间跳转
- struts2 action 之间跳转
- struts2 action跳转
- struts2 action 之间跳转
- struts2 action 页面跳转
- Struts2之Action跳转
- struts2 Action之间跳转
- 关于源文件使用的说明
- EdtiPlus-最好用的文本编辑器+使用技巧集萃
- spring mvc:业务层事务管理
- spring mvc:测试
- 状态机实践入门
- struts2首页跳转后执行action
- Kgdb调试linux kernel module
- java API的学习方法
- Android Sample NotePad学习三
- GNU C 扩展之__attribute__ 机制简介
- Amazon EBS弹性块存储服务初探
- jQuery总体架构的理解
- SMS管理:收信箱 发信息 编写新信息
- 捡起linux ---(1)