Let\'s say I\'ve got a form for editing the properties of a Pony, and in my web application there are multiple places where you can choose to edit a Pony. For instance, in a li
Here's how to do it boys (Note this is RESTful Spring 3 MVC syntax but it will work in older Spring controllers):
@RequestMapping(value = "/rate", method = RequestMethod.POST)
public String rateHandler(HttpServletRequest request) {
//your controller code
String referer = request.getHeader("Referer");
return "redirect:"+ referer;
}