struts2防止重複提交

JSP代碼:下

<html>
<head>
<title>會員註冊</title>
</head>
<body οnlοad="parameter(CERTTYPE)">
<s:form action="updatepassword.action">
<s:fielderror></s:fielderror>
[color=red]<s:token />[/color]
<table>
<tr><td>帳號:
<input type="text" name="uname" /></td></tr>
<tr><td>密碼:
<input type="password" name="passwd" /></td></tr>
</table>
</s:form>
</body>
</html>

struts.xml代碼:下

<action name="updatepassword" class="userAction"
method="updatepassword">
<result name="input">/updpwd.jsp</result>
<result name="failure">
/result.jsp
</result>
<result name="success" type="redirect">/result.jsp</result>
[color=red]<interceptor-ref name="token" />
<result name="invalid.token" type="dispatcher">
/WEB-INF/jsp/firstpage.jsp
</result>
<interceptor-ref name="defaultStack" />[/color] </action>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章