jsp - how to avoid repeated data is getting displayed in struts2 when I refresh the page,I am using S2 anchor tag ..not using form -


i struck in problem....i have link in anchor tag mapped action , when click on on link display rows of 1 of table's data database...and in jsp using s2 iterator tag display contents.so when refresh page again action executing results in repeated data getting displayed in jsp page....i came know in forms can use token tag this... want using anchor tag please me.

struts.xml code:

<action name="displaymails" class="com.money.action.displaymailaction">    <result name="success" type="redirect"> </result>  </action> 

<html>     <head>         <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>         <script>             $(document).ready(function() {                  window.history.pushstate("","", location.href);              });         </script>     </head>     <body>         <!-- stuff -->     </body> </html> 

it works on html5 browsers only, if targeting old internet explorers, won't.

edit: added cdn jquery, in case wasn't clear...


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -