ICEfaces
  1. ICEfaces
  2. ICE-1558

Use relative URLs for ICEfaces' resources

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      Any Servlet environment (thus not Portlet environment)

      Description

      When writing the script elements and such for icefaces-d2d.js and other resources, the src attribute should contain a relative URL in case of a Servlet environment. (For the Portlet environment it is important that the context path is added to the URL.)

      In case the "outside" URL to the ICEfaces application needs to be something like http://www.host.com/context/icefaces-application and the local URL is http://local/icefaces-application, it should be possible to put a web server into the front of the application server that proxies all requests. Currently ICEfaces puts "absolute" URLs in the src attribute of script elements like "/icefaces-application/xmlhttp/<server-startup-timestamp>/icefaces-d2d.js". In this case the client will resolve this to http://www.host.com/icefaces-application/xmlhttp/&lt;server-startup-timestamp&gt;/icefaces-d2d.js instead of http://www.host.com/context/icefaces-application/xmlhttp/&lt;server-startup-timestamp&gt;/icefaces-d2d.js. When ICEfaces writes something like "./xmlhttp/<server-startup-timestamp>/icefaces-d2d.js" to the src attribute, the client will resolve correctly to http://www.host.com/context/icefaces-application/xmlhttp/&lt;server-startup-timestamp&gt;/icefaces-d2d.js, giving the web server the ability to correctly proxy this request to the application server.

      There also seems to be URL like this in our JavaScript bridge. We should let the client take care of correctly resolving these URLs, as the client knows in which context it resides. The application server doesn't know that the web server "changes" the outside context to be accessed.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: