This content has been marked as final.
Show 1 reply
-
1. Re: Error when sendRedirect called in ActionMapping
ceik Dec 30, 2010 4:44 AM (in response to ceik)After some frustration and digging around in debug, I found that StateAwareResponseImpl.setRenderParameter(name, value) was called when i "redirected" action call to another controller (applicationContext.xml):
...
<bean id="parameterMappingInterceptor" class="org.springframework.web.portlet.handler.ParameterMappingInterceptor" />
<bean id="portletModeParameterHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping">
<property name="order" value="1"/>
<property name="interceptors">
<list>
<ref bean="parameterMappingInterceptor"/>
</list>
</property>
<property name="portletModeParameterMap">
<map>
<entry key="view">
<map>
<entry key="myAction"><ref bean="myActionHandlerController" /></entry>
</map>
</entry>
</map>
</property>
</bean>
...The case was that I had a portlet (controller/view) where I, in the render, "redirected" to another non portlet controller/view, because this was a multistep flow where I would like to split the code for better overview.
By "moving back" the action handling to the original controller, everything was OK.
But for the case of redirecting within the portal, any comments/sugestions (or confirmation) to the method response.sendRedirect will be appreciated.
/Cato