Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74114 Make Liferay compatible with version 2.0 tests in the Portlet 3.0 TCK
  3. LPS-76109

Portlet 3.0 TCK: The parameters associated with a request dispatcher should be scoped only for the duration of the dispatching.

    Details

      Description

      Test case failure:

      16 test cases fail:

      • V2DispatcherTests3S_SPEC2_19_ForwardJSPAction_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardJSPEvent_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardJSPRender_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardJSPResource_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardServletAction_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardServletEvent_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardServletRender_dispatch4
      • V2DispatcherTests3S_SPEC2_19_ForwardServletResource_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeJSPAction_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeJSPEvent_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeJSPRender_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeJSPResource_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeServletAction_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeServletEvent_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeServletRender_dispatch4
      • V2DispatcherTests3S_SPEC2_19_IncludeServletResource_dispatch4

      For example:

      V2DispatcherTests3S_SPEC2_19_ForwardJSPResource_dispatch4: Details: The parameters associated with a request dispatcher are scoped only for the duration of the include or forward call. In Before dispatch but not in After dispatch: [] In After dispatch but not in Before dispatch: qparm2, qparm1

      Background:

      According to PLT 25.1.1

      The portlet container must aggregate parameters specified in the query string used to create the PortletRequestDispatcher with the portlet render parameters. Query string parameters take precedence over other portlet render parameters of the same name passed to the servlet or JSP targeted by the forward or include. The parameters associated with a PortletRequestDispatcher are scoped to apply only for the duration of the forward or include call.

      In Liferay, during dispatching, if the query string exists, PortletRequestImpl will be provided a wrapped servlet request, _portletRequestDispatcherRequest. It will delegate some of the logic to this servlet request instead of the original request it holds. However, when dispatching finishes, we don't set _portletRequestDispatcherRequest back to null, so that the params can still be accessed.

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              dante.wang Dante Wang
              Recent user:
              Csaba Turcsan
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 37 weeks, 2 days ago

                Packages

                Version Package
                7.0.0 DXP FP33
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                Master