I had the same problem. solved it like this:
return new ModelAndView("redirect:/user/list?success=true");
And then my controller method look like this:
public ModelMap list(@RequestParam(required=false) boolean success) {
ModelMap mm = new ModelMap();
mm.put(SEARCH_MODEL_KEY, campaignService.listAllCampaigns());
if(success)
mm.put("successMessageKey", "campaign.form.msg.success");
return mm;
}
Works perfectly unless you want to send simple data, not collections let's say. Then you'd have to use session I guess.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…