Neil Griffin created PLUTO-731: ---------------------------------- Summary: TCK: Contesting usage of PortletRequest.getProperty("Referer") in V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5 Key: PLUTO-731 URL: https://issues.apache.org/jira/browse/PLUTO-731 Project: Pluto Issue Type: Bug Components: tck Affects Versions: 3.0.1, 3.0.0 Reporter: Neil Griffin Assignee: Neil Griffin Fix For: 3.0.2
The TCK test case for V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5 looks like the following: {code:java|title=RenderStateTests_SPEC2_12_MutableRenderState.java} /* * TestCase: * V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5 */ /* * Details: * "Throws IllegalStateException if the method is invoked after sendRedirect has been called." */ TestResult result = tcd.getTestResultFailed( V3RENDERSTATETESTS_SPEC2_12_MUTABLERENDERSTATE_SETPORTLETMODE5); try { String referer = portletReq.getProperty("Referer"); portletResp.sendRedirect(referer); portletResp.setPortletMode(PortletMode.UNDEFINED); } catch (IllegalStateException e) { result.setTcSuccess(true); result.appendTcDetail(e.toString()); } result.writeTo(writer); {code} This issue is contesting usage of {{PortletRequest.getProperty("Referer")}} since the test anticipates a {{RenderURL}} for redirection. When the TCK runs in an automated fashion, V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode4 precedes V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5. Since Apache Pluto implements the post-redirect-get design pattern, the "Referer" is a RenderURL. Liferay Portal does not implement post-redirect-get by default, and the "Referer" is an ActionURL. A more appropriate URL to use for redirection is the new Portlet 3.0 {{ActionResponse.createRedirectURL(MimeResponse.Copy)}} method. -- This message was sent by Atlassian JIRA (v7.6.3#76005)