I tried to implement token interceptor with the <s:url ..
tag but its showing error on the first click. i.e.
The form has already been processed or no token was supplied, please try again.
I want to implement this interceptor, because if users already deleted a row and refresh the page once again then the same action should not perform once again.
<s:url id="linkdelete" action="DeleteLatestUpload.action" namespace="/admin/insecure/upload">
<s:param name="latestUploadId" value="latestUploadId"></s:param>
<s:token name="token"></s:token>
</s:url>
<a href='<s:property value="#linkdelete"/>' style="color: white;text-decoration: none;" class="delbuttonlink">Clear current Uploads</a>
and my struts.xml
:
<action name="DeleteLatestUpload" class="v.esoft.actions.UploadExcel" method="deleteUploads">
<interceptor-ref name="token"></interceptor-ref>
<interceptor-ref name="basicStack"></interceptor-ref>
<result name="success" type="tiles"> uploadforward</result>
<result name="invalid.token" type="tiles">uploadforward </result>
</action>