Struts form to prevent duplicate submission

Struts after going through several internal interceptor, arranged just in the following code can be prevented struts.xml Form to repeat

<action name="login" class="com.lzw.action.UserAction">

<! - Configure interceptors to intercept the token ->

<interceptor-ref name="defaultStack"/>

<interceptor-ref name="tokenSession"/>

<result>/success.jsp</result>

<!-- <result name="invalid.token">/invalidtoken.jsp</result> -->

</action>

Since tokenSession not defaultStack configuration, the configuration of the <interceptor-ref name = "tokenSession" />, struts original interceptor will fail, it is necessary

添加<interceptor-ref name="defaultStack"/>

Guess you like

Origin www.cnblogs.com/xiaowenwen/p/11455806.html