I tried to implement an intercept token with the <s:url .. tag, but its error display on the first click. ie The form has already been processed or no token was supplied, please try again.
I want to implement this interceptor, because if users have already deleted the line and reloaded the page again, then the same action should not be performed 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>
source share