Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-91328

The characterEncoding, contentType, and resourceID annotation attributes are ignored for @ServeResourceMethod

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.1.0 CE GA1, 7.1.10 DXP GA1, 7.1.10 DXP FP1, 7.1.10 DXP FP2, 7.1.10 DXP FP3, 7.1.1 CE GA2, 7.1.10 DXP FP4, 7.1.10 DXP FP5, 7.1.10.1 SP1, 7.1.2 CE GA3, 7.1.10 DXP FP6, 7.1.10 DXP FP7
    • Fix Version/s: 7.1.X, Master
    • Labels:
      None

      Description

      Problem Overview

      The @ServeResourceMethod annotation has several attributes as defined in the Portlet 3.0 Javadoc.

      Liferay Portal currently ignores the characterEncoding, contentType, and resourceID annotation attributes.

      Steps to Reproduce

      1. Deploy the attached WAR to $LIFERAY_HOME/deploy and add the "LPS-91328" portlet to a portal page.

      2. Record the test results displayed by the portlet

      3. Click on the "Invoke firstResource" link and record the output in the new browser tab.

      4. Click on the "Invoke secondResource" link and record the output in the new browser tab.

      Expected Results

      A) The test results from step 2 are:

      CLIENT TEST PASSED - contentType was set to application/json;charset=ISO-8859-1
      
      SERVER TEST PASSED - contentType was set to application/json
      
      SERVER TEST PASSED - characterEncoding was set to ISO-8859-1
      

      B) The test results from step 3 are:

      Invoked resource methods:
      * firstResource
      * omniResource
      

      C) The test results from step 4 are:

      Invoked resource methods:
      * secondResource
      * omniResource
      

      Actual Results

      Test failures reported in step 2, and the following reported by both step 3 and 4:

      Invoked resource methods:
      * firstResource
      * secondResource
      * omniResource
      

        Attachments

          Activity

            People

            • Assignee:
              shuyang.zhou Shuyang Zhou
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Recent user:
              Michael Saechang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                40 weeks, 3 days ago

                Packages

                Version Package
                7.1.X
                Master