1:提交页面前一个action this.saveToken(request);
2:提交页面
<input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value= "<%=session.getAttribute("org.apache.struts.action.TOKEN")%>"/>
3:处理提交的action
if(isTokenValid(request,true)){
//commonDataBean.executeUpdate(sql);//处理执行sql语句代码
resetToken(request);
}else{
this.saveToken(request);
}
Token 重复提交问题解决
最新推荐文章于 2024-09-16 16:06:42 发布