Sling
  1. Sling
  2. SLING-2790

Need a way to get the resource of the original request in a subcomponent

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: API
    • Labels:
      None

      Description

      • I have created a component at /apps/training/components/tasklist/tasklist.jsp.
      • I have a page node at /content/training with a sling:resourceType of training/components/page
      • That page has a subnode /content/training/content/tasklist with a sling:resourceType of training/components/tasklist (the tasklist.jsp from above)

      In the tasklist.jsp, I would like to get the path to the resource of the original HTTP request, i.e. /content/training. I expected to get it using slingRequest.getRequestPathInfo().getResourcePath() but that gets me the path to the current resource (/content/training/content/tasklist), not the path to the request.

      Having the original resource in a predefined variable or a call like slingRequest.getOriginalRequestPathInfo() would be very helpful.

        Activity

        Axel Hanikel created issue -
        Gavin made changes -
        Field Original Value New Value
        Workflow no-reopen-closed,doc-test-required [ 12771243 ] re-open possible,doc-test-required [ 12789955 ]
        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12789955 ] no-reopen-closed,doc-test-required [ 12792355 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Axel Hanikel
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development