Mindaugas Žakšauskas opened SPR-5140 and commented
I have spent unproportionally high amount of time just trying to get a simple HTTP redirect working. Looked at the Javadocs, forums, etc. until asked a colleague who actually had traced this to Spring sources once after killing numerous hours. I think the Javadoc (and maybe the manual as well) must be improved to make this more clear.
The situation is simple: SimpleFormController handles a form submission, and needs to redirect to an external page/URL after it's done. The missing chain I (and most of other people I presume) missed there is to set the "redirectAction" to true. However, the crucial bit is that calling setRedirectAction( true ) is simply not enough - it needs to be called early, and preferably set in the portlet configuration. This, in my opinion, must be clearly explained in the header of Javadoc of org.springframework.web.servlet.view.RedirectView class, and possibly in the description of the redirectAction attribute itself.
Affects: 2.5.5