Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2 Sprint 8
    • Fix Version/s: 2.2 Sprint 9
    • Component/s: Resources
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_medium importance_large

      Show
      size_medium importance_large

      Description

      ExternalContext.encodeResourceURL() currently serves two purposes:

      1. Performs session id-related URL rewriting (HttpServletResponse.encodeURL()
      2. Performs portlet-specific URL rewriting

      A drawback of performing both of these tasks in a single method is that there is no way to support the portlet case without also running the risk of having the session id written into the resource URL. In many cases (eg. JavaScript libraries, images, css files), there is simply no requirement to access the session, however, URLs for these images may become unnecessarily bloated with the session id. Another downside is that the presence of the session id in the URL can thwart caching.

      Logging this issue to request that JSF provide a resource encoding API that provides the goodness of portlet-related encoding without the annoyances of requiring the URLs to potentially be session id-encoded at the same time.

      (Of course, we'll want the portlet folks to review this to make sure that whatever we do will be acceptable from a portlet/portlet bridge perspective.)

        Activity

        Hide
        Ed Burns added a comment -

        Carry forward to 2.2 Sprint 9.

        Show
        Ed Burns added a comment - Carry forward to 2.2 Sprint 9.
        Hide
        Ed Burns added a comment -

        Here are the current usages of externalContext.encodeResourceURL()

        • In the renderer for <h:graphicImage>, this is used to render the value
          of the "src" attribute.
        • In the renderer for <h:outputLink>, this is used to render the value
          of the "href" attribute.
        • In the renderer for <h:outputScript>, this is used to render the value
          of the "src" attribute.
        • In the renderer for <h:outputStylesheet>, this is used to render the value
          of the "href" attribute.

        Now, this issue requests an additional API for doing the same thing that
        encodeResourceURL() does, but without calling
        httpServletResponse.encodeURL().

        Couldn't this issue be addressed by having the portlet bridge
        implementation simply not call httpServletResponse.encodeURL()?;

        Show
        Ed Burns added a comment - Here are the current usages of externalContext.encodeResourceURL() In the renderer for <h:graphicImage>, this is used to render the value of the "src" attribute. In the renderer for <h:outputLink>, this is used to render the value of the "href" attribute. In the renderer for <h:outputScript>, this is used to render the value of the "src" attribute. In the renderer for <h:outputStylesheet>, this is used to render the value of the "href" attribute. Now, this issue requests an additional API for doing the same thing that encodeResourceURL() does, but without calling httpServletResponse.encodeURL(). Couldn't this issue be addressed by having the portlet bridge implementation simply not call httpServletResponse.encodeURL()?;
        Hide
        Ed Burns added a comment -

        Pending input from Andy, I'm closing this as WONTFIX. Our resident Portlet Expert has indicated that this isn't a problem for him.

        If you want to re-open it, please do, but please allocate some time to help me understand how to fix it.

        Show
        Ed Burns added a comment - Pending input from Andy, I'm closing this as WONTFIX. Our resident Portlet Expert has indicated that this isn't a problem for him. If you want to re-open it, please do, but please allocate some time to help me understand how to fix it.
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out

          People

          • Assignee:
            Ed Burns
            Reporter:
            aschwart
          • Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 week, 1 day
              1w 1d
              Remaining:
              Remaining Estimate - 1 week, 1 day
              1w 1d
              Logged:
              Time Spent - Not Specified
              Not Specified