http://www.oschina.net/translate/spring-mvc-flash-attribute-examplespring
@RequestMapping
(value=
"addcustomer"
, method=RequestMethod.POST)
spring-mvc
public
String addCustomer(
@ModelAttribute
(
"customer"
) Customer customer,
mvc
final
RedirectAttributes redirectAttributes) {
app
//...
spa
redirectAttributes.addFlashAttribute(
"message"
,
"Successfully added.."
);
.net
//...
code
return
"redirect:some_other_request_name"
;
flash
}
request