Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Resources
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      900
    • Status Whiteboard:
      Hide

      size_large importance_large

      Show
      size_large importance_large

      Description

      JSF resource handling does not allow the usage of images with relative paths in
      css like this:

      url('img01.jpg')
      url('../img/img02.jpg')

      This is caused by the way resources are loaded in JSF. For a css this would for
      instance be:

      http://www.example.com:8080/javax.faces.resource/style.css.jsf?ln=css

      The browser would then try to load the images above with the following urls:

      http://www.example.com:8080/javax.faces.resource/img01.jpg
      http://www.example.com:8080/img/img02.jpg

      None of them would resolve to an image. In the first case the library is missing
      and in the second one the prefix.

      The problem could be avoided by using #

      {resource['...']}

      in the css. The
      drawbacks of this approach are that it is not "designer friendly" and that it
      creates a performance bottleneck (value expressions have to be evaluated again
      and again). Furthermore, resources could also be referenced in other files that
      currently don't support value expressions.

      A solution would be to have a "real" path for resources including the library
      name. On resolving the library name could be retrieved as the part of the path
      between the prefix and the first slash (slashes are not allowed in lib names
      anyway). This will apparently only work for prefix mapping but the current
      solution is not working at all.

      Another possibility would be to register "/javax.faces.resource/*" as a servlet
      mapping for resources (with Servlet 3 this could be done automatically).

        Issue Links

          Activity

          Hide
          ramiromagalhaes added a comment -

          I think this duplicates JAVASERVERFACES_SPEC_PUBLIC-884.

          Show
          ramiromagalhaes added a comment - I think this duplicates JAVASERVERFACES_SPEC_PUBLIC-884 .
          Hide
          Jakob Korherr added a comment -

          adding duplication link

          Show
          Jakob Korherr added a comment - adding duplication link
          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:
              michael_kurz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: