+1 for both answers.
Post / Redirect / Get is a classic template for every web technology.
Token Interceptor is another way when you use Struts2;
There is a third way if you don't need retro compatibility with older browsers or browsers with Javascript disabled: HTML5 window.history.pushState .
Just reset the original URL after loading the page, and pressing F5 will get the original page instead of sending the request again.
$(document).ready(function() { window.history.pushState("","", "myOriginalUrlWithNoParams"); });
Andrea Ligios
source share