|
Patrick, Sorry for the slow response. The sendRedirect issue is a serious pain and does require some careful handling so that it can work. You are correct that the portlet spec makes it illegal to call sendRedirect after certain other methods, like setRenderParameter, have been called. However, it is possible to use sendRedirect with Spring Portlet MVC. In fact the sample code includes an example portlet that will do a redirect to an aribitrary URL. Take a look at it for more details. So, this means that, either in the Spring Portlet code you are using or in your own code, something that breaks sendRedirect is being called before you can issue the redirect. Most likely this means either the Controller or an Interceptor is doing this. First, what specific Controller class does your controller decend from? If it is an AbstractController, then the issue must be elsewhere since AbstractController itself never makes any calls to setRenderParameter (or the other methods that break sendRedirect). If your controller descends from AbstractFormController, SimpleFormController, or AbstractWizardFormController, then you must set the 'redirectAction' property to true on this controller so that setRenderParameter will not be called by the AbstractFormController code. Second, are you using the ParameterMappingInterceptor with this portlet? If so, this will break redirect since the whole point of this Interceptor is to automatically propagate the parameter you are using for your mapping from the action phase to the render phase. If so, remove this Interceptor and propagate the parameter manually in your Controllers when you do need it. Or create a different version of the Interceptor that propagates it during the afterCompletion method instead of the preHandle method -- although this will prevent you from changing the parameter in your Controller, if desired. I hope that helps you find the issue. Let me know how it goes. John Patrick Huber wrote: Hi again I've been investigating a little bit more in the mean time and it's a "bug" in spring portlet. The Portlet Spec, Chapter PLT.12.2.1 (page 50), defines the exact behaviour of sendRedirect (compare with the details in my first mail).Is it possible to work around the problem? If there is a place to post an official issue, I'll happily open an issue there. It's just, the springframework jira doesn't appear to be the right place since spring-portlet is not listed under the springweb module. regards Patrick 2005/12/6, Patrick Huber <[EMAIL PROTECTED]>: |
- Spring-Portlet: sending a redirect Patrick Huber
- Re: Spring-Portlet: sending a redirect Patrick Huber
- Re: Spring-Portlet: sending a redirect David H. DeWolf
- Re: Spring-Portlet: sending a redirect Nick Lothian
- Re: Spring-Portlet: sending a redirect Patrick Huber
- Re: Spring-Portlet: sending a redirect John Lewis
