ICEfaces
  1. ICEfaces
  2. ICE-4963

Avoid defining extra servlet mappings in web.xml

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha1
    • Fix Version/s: 2.0-Alpha1, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      server
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      Look at ways to elimitate */icefaces/* servlet mapping. All the ICEfaces specific URLs should end in '.icefaces.jsf' . This way PushResourceHandler can identify the requests that need to be handled by ICEfaces code.

        Activity

        Hide
        Mircea Toma added a comment -

        Changed bridge request paths to use icefaces.jsf extension. This way no additional servlet mapping is needed for ICEfaces to run.

        In case a component or the application is using dynamic resources then /icefaces/ servlet mapping needs to be added. By using a prefix based mapping the relative paths that a resource might use to reference other resources will work properly.

        For example FCKEditor (in RichInputText component) has a master JS file that references other files – fckeditor.js. The generated path for this file will look like this: icefaces/resource/MTE1NTg0NjEyMg==/ . One of the files referenced by fckeditor.js is ./fckeditor.html. The generated path for the references path is: icefaces/resource/MTE1NTg0NjEyMg==/fckeditor.html. This way the relative path will work properly.

        If the suffix based servlet mapping would be used (.icefaces.jsf) the generated paths would be
        resource/MTE1NTg0NjEyMg==/.icefaces.jsf and resource/MTE1NTg0NjEyMg==/fckeditor.html.icefaces.jsf but the master file will use relative path to reference ./fckeditor.html file which will result into a failed request to resource/MTE1NTg0NjEyMg==/.icefaces.jsf./fckeditor.html.

        Show
        Mircea Toma added a comment - Changed bridge request paths to use icefaces.jsf extension. This way no additional servlet mapping is needed for ICEfaces to run. In case a component or the application is using dynamic resources then /icefaces/ servlet mapping needs to be added. By using a prefix based mapping the relative paths that a resource might use to reference other resources will work properly. For example FCKEditor (in RichInputText component) has a master JS file that references other files – fckeditor.js. The generated path for this file will look like this: icefaces/resource/MTE1NTg0NjEyMg==/ . One of the files referenced by fckeditor.js is ./fckeditor.html. The generated path for the references path is: icefaces/resource/MTE1NTg0NjEyMg==/fckeditor.html. This way the relative path will work properly. If the suffix based servlet mapping would be used (.icefaces.jsf) the generated paths would be resource/MTE1NTg0NjEyMg==/.icefaces.jsf and resource/MTE1NTg0NjEyMg==/fckeditor.html.icefaces.jsf but the master file will use relative path to reference ./fckeditor.html file which will result into a failed request to resource/MTE1NTg0NjEyMg==/.icefaces.jsf./fckeditor.html.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: