ICEfaces
  1. ICEfaces
  2. ICE-11484

ice:outputResource, ace:dynamicResource fail when resource name contain spaces

    Details

    • Support Case References:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Avoid using spaces in resource names. Instead use underscore characters or encode spaces with the %20 string.

      Description

      When loading a page that serves a resource, such page fails to load, and an exception page is displayed instead with a message that reads "java.net.URISyntaxException: Illegal character in path at index...".

      This issue wasn't present in the P03 release. It started to fail in the P04 release.

        Activity

        Hide
        Arturo Zambrano added a comment -

        r53170: encoded spaces in the resource URI
        r53169: committed fix to customer's branch

        ICE-11093 removed the URI encoding logic added as per ICE-6931, because it turned DynamicResourceDispatcher into a facade for org.icefaces.application.ResourceRegistry, so it wasn't possible to add this encoding logic back there, because this is now just a facade that is used only by compat components. Also, using URLEncoder doesn't work here, because it encodes other characters that shouldn't be encoded in this case, such as forward slashes. So, the fix consists in only encoding spaces in the URI with the string "%20".

        Show
        Arturo Zambrano added a comment - r53170: encoded spaces in the resource URI r53169: committed fix to customer's branch ICE-11093 removed the URI encoding logic added as per ICE-6931 , because it turned DynamicResourceDispatcher into a facade for org.icefaces.application.ResourceRegistry, so it wasn't possible to add this encoding logic back there, because this is now just a facade that is used only by compat components. Also, using URLEncoder doesn't work here, because it encodes other characters that shouldn't be encoded in this case, such as forward slashes. So, the fix consists in only encoding spaces in the URI with the string "%20".

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arturo Zambrano
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: