You can have processForm()
return a View object instead, and have it return the concrete type RedirectView
which has a parameter for setExposeModelAttributes()
.
When you return a view name prefixed with "redirect:"
, Spring MVC transforms this to a RedirectView
object anyway, it just does so with setExposeModelAttributes
to true (which I think is an odd value to default to).