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-75367

Portlet 3.0 TCK: PortletServletRequest.getPathTranslated should return the realPath of PortletServletRequest's pathInfo

    Details

      Description

      Test Results:

      There are 16 test cases in V2DispatcherReqRespTests1, V2DispatcherReqRespTests2, V2DispatcherReqRespTests3, V2DispatcherReqRespTests4 fails because of this. For example: Test case V2DispatcherReqRespTests1_SPEC2_19_ForwardJSPActionRequest_getPathTranslated: Details: In a target jsp of a forward in the Action phase, the method HttpServletRequest.getPathTranslated must a value corresponding to the path used to obtain the PortletRequestDispatcher.

      Background:

      According to Servlet Spec 3.1 Chapter 3.6:

      There are two convenience methods in the API which allow the Developer to obtain the file system path equivalent to a particular path. These methods are:

      • ServletContext.getRealPath
      • HttpServletRequest.getPathTranslated

      The getRealPath method takes a String argument and returns a String representation of a file on the local file system to which a path corresponds. The getPathTranslated method computes the real path of the pathInfo of the request.

      Since the pathInfo of the PortletServletRequest can be different with the pathInfo of the HttpServletRequest it wraps, PortletServletRequest.getPathTranslated should return the realPath of PortletServletRequest's pathInfo.

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            leon.chi Leon Chi (Inactive)
            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:
              3 years, 30 weeks, 1 day ago

                Packages

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