重复提交

1.struts2.1.6

<action name="transfer" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="token"/>   这个是防止重复提交,只提交一次
            <result name="invalid.token">doublePost.jsp</result>
            <result name="success">transferDone.jsp</result>
        </action>

或者:

<action name="transfer3" class="org.apache.struts2.showcase.token.TokenAction">
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="tokenSession"/>
            <result name="invalid.token">doublePost.jsp</result>
            <result name="success" type="redirect">transferDone.jsp</result>成功之后转发
        </action>

2。http://blog.sina.com.cn/s/blog_5b142cae0100ciqk.html

 

3.http://hi.baidu.com/tobyqq/blog/item/89da2ec302a48356b219a8e2.html

 

    还是javascript,将提交按钮或者image置为disable  
   <html:form action="myAction.do" method="post"
   onsubmit="getElById('submitInput').disabled = true; return true;">   
   <html:image styleId="submitInput" src="images/ok_b.gif" border="0" /> 
   </html:form>  

你可能感兴趣的:(JavaScript,apache,html,jsp,Blog)