struts第十六天---防止表单重复提交
来源:互联网 发布:linux解压和压缩命令 编辑:程序博客网 时间:2024/04/26 17:48
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>
<constant name="struts.ui.theme" value="simple"/>
<package name="isoftstone" namespace="/isoftstone" extends="struts-default">
<action name="person" class="com.isoftstone.study.PersonAction">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="token"/>
<result name="invalid.token">/index.jsp</result>
<result name="success">/WEB-INF/page/message.jsp</result>
</action>
</package>
</struts>
package com.isoftstone.study;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class PersonAction extends ActionSupport{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String execute(){
return "success";
}
}
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>index.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
<s:form action="person" namespace="/isoftstone" method="post">
姓名:<s:textfield name="name"/><s:token></s:token>
<input type="submit" value="发送"/>
</s:form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>结果</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>
${name}<br/>
<s:property value="name"/>
<br/><%=new Date() %>
</body>
</html>
- struts第十六天---防止表单重复提交
- struts表单防止重复提交
- struts 防止表单重复提交
- struts防止表单重复提交
- Struts防止表单重复提交
- Struts防止表单重复提交
- Struts防止表单重复提交(转载)
- struts防止用户重复提交表单
- 《struts---利用Token防止表单重复提交》
- 使用Struts 2防止表单重复提交
- Struts 2防止表单重复提交
- 使用Struts实现防止表单重复提交
- Struts中防止表单重复提交
- 使用Struts 2防止表单重复提交
- 【Struts】表单的防止重复提交
- struts防止重复提交
- Struts防止重复提交
- 防止struts重复提交
- Dell D630 BCM4311 无线网卡驱动 ubuntu 10.04 安装
- 中文计算器更新!
- 嵌入式系统 Boot Loader 技术内幕
- 找出A字符串中 B字符串没有的字符(运用java api)
- 经典C
- struts第十六天---防止表单重复提交
- U-Boot启动过程完全分析
- apache+tomcat集群
- U-Boot编译过程完全分析
- Android 解决程序启动时的黑屏问题
- 让免费游戏带来回报的15种方法 乐趣是核心
- CentOS 无法识别NTFS问题
- JOSN对象转化为字符串,字符串转化为JSON对象
- 用代码和UML图化解设计模式之《创建者模式》