ICEfaces
  1. ICEfaces
  2. ICE-6851

The {{command}} replacement strategy doesn't work with WebSphere 7 Portal stateful URLs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, EE-2.0.0.GA
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 WebSphere Portal 7

      Description

      Initially logging into a WebSphere 7 portal page results in this kind of URL:

      http://192.168.55.111:10039/wps/myportal/!ut/p/b1/04_Sj9CPykssy0xPLMnMz0vM0Q90LSrKLwpOLS4G8kMyc1PzS0tAiqLM4p3dHT1MzH0MDCxMLQwNPB09Qs3Ngl2MDFzN9cP1o_AqCTSBKjDAARwN9P2w2VyQ4eVR7qioCAABx-t_/dl4/d5/L3dJdyEvUUd3SndBQSEvNEprRS9aNl8wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBBMA!!/

      In the resulting page markup, the ICEpush configuration info looks like this:

      <span id="A1176:v2fvcng6_icepush">
          <script type="text/javascript">ice.push.configuration.contextPath="/";ice.push.configuration.uriPattern="/wps/myportal/Home/chat/!ut/p/b1/hY7BjoIwFEW_xS94r1KgLhslClQHBgHphhBSlYkK0xYS_fpxJrM13t1NTu49IKEi_oL4jLgMDiBvzdSdGtv1t-by26VXo5c4iVi6NF5_uhjmdLeKaEQQCZQg_5Dlmm-oLxCZywiGfJP7XraaY0r_AXwRjm8WuAO7QOteZ8qYp9W-u6p-tM_nSvov1dgcSq1MP-pWQdo27VkJNalL0pwUZHBAWmdfbIhFMBoMrNgH1JLOxqKlk8iHD1IttrEZtlleF_e7Lh9OkRc85TZ6fNN0NoOrjIKjqsIf4eBGPw!!/";
          </script>
      </span>

      Using Firebug, you can see that the initial request to get the bridge.js file is:

      http://192.168.55.111:10039/wps/myportal/Home/chat/!ut/p/b1/dY3NjoIwFEafxSe4t1AoLBskIlQHhilIN6QhjTIRYaCS6NPPT2br2X3JyXdAQRN66LOQOQ6cQN302p-17cebvv5u5bfo524uIo9mu3cP95IetylNCSKBGtSfEu14QplADLyA4J4nkvnl1kHu_gv4Ao5wTMbB_Dw1ir1MBQ7Us1nG-9wZKDrdXYwwq7nm-myghBPStvwMpkzE9wVjKz5iaklvM9HRVcjpjTThIVumQynb6vGY66dbyYoX3KbPL1psNjCoNHGHiH8DL6JcbQ!!/

      The original request to get icepush.js is:

      http://192.168.55.111:10039/wps/myportal/Home/chat/!ut/p/b1/dY3LDoIwFES_xS-4t1AoLBtAECqiiEo3pGkaxYioIN_vI26d3ZmczICE2nfQZT6zLDiAvKqpPaqx7a_q8mHpNugWdiECh2bxxsFFRfMwpSlBJLAH-VWCmCeUCUTP8QgueFIxtwwt5PZPwD_hCHnSd-a9VEv298qzYP8wQ_98aANrrfTJCDOZS6GOBko4IG3Ks3fLRPQcMBrFNqIjacdMaDqJ6rYidbP8dFlgr3A53Mngk918HfHY5PNQz6CTaWJ3AX8BX6pOrQ!!/

      The ICEpush config on the page is set to use the same URL as it did for getting the ICEfaces bridge:

      <span id="A1176:v2fvcngc_icepush">
          <script type="text/javascript">ice.push.configuration.contextPath="/";ice.push.configuration.uriPattern="/wps/myportal/Home/chat/!ut/p/b1/dY3NjoIwFEafxSe4t1AoLBskIlQHhilIN6QhjTIRYaCS6NPPT2br2X3JyXdAQRN66LOQOQ6cQN302p-17cebvv5u5bfo524uIo9mu3cP95IetylNCSKBGtSfEu14QplADLyA4J4nkvnl1kHu_gv4Ao5wTMbB_Dw1ir1MBQ7Us1nG-9wZKDrdXYwwq7nm-myghBPStvwMpkzE9wVjKz5iaklvM9HRVcjpjTThIVumQynb6vGY66dbyYoX3KbPL1psNjCoNHGHiH8DL6JcbQ!!/";
          </script>
      </span>

      On Liferay, the ICEpush configuration results in something like this:

      <span id="A9944:v9iqym2_icepush">
          <script type="text/javascript">/*&lt;![CDATA[*/ice.push.configuration.contextPath="/";ice.push.configuration.uriPattern="/web/guest/chat1?_chatice2portlet_WAR_chatportlet_INSTANCE_nh4N_javax.faces.resource={{command}}&amp;p_p_cacheability=cacheLevelPage&amp;p_p_col_count=1&amp;p_p_col_id=column-1&amp;p_p_id=chatice2portlet_WAR_chatportlet_INSTANCE_nh4N&amp;p_p_lifecycle=2&amp;p_p_mode=view&amp;p_p_state=normal";/*]]&gt;*/
          </script>
      </span>

      It seems likely that this is all related to WebSphere Portal 7's own support for back button history in that a bunch of state is encoded into URLs. Not sure it's playing nice with what we want to do. For example, we replace the {{command}} marker dynamically in the URL but once it's been encoded by WebSphere, it's no longer there to be replaced.

      From WebSphere's own documentation:

      "Considerations for administrators about Back button behavior
      The Back button behavior of the portal is internally achieved by coding the combination of all states into the address of the view, that is into its URL. Thus each different combination of navigational states results in a different URL. This has the following additional advantages:

      Users can set separate bookmarks for different states of the same page.
      You can have pages cached by configuring specific requirements. For more details about how to do this, refer to Caching.
      However, make no assumptions about the syntax or structure of portal URLs. For example, you cannot create valid URLs by simple concatenation. This will automatically be true if only the public API is used to create URLs. The latest version of the IBM Portlet API Javadoc is always available from the WebSphere Portal Product Documentation page."

        Activity

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Assignee Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24568 Fri May 13 08:46:18 MDT 2011 mircea.toma ICE-6851 Use URIs constructed on the server side and defined in ICEpush JS configuration instead of constructing the URIs from a URI pattern by just replacing the command token.
        Files Changed
        Commit graph MODIFY /icepush/trunk/core/src/main/java/org/icepush/servlet/BrowserBoundServlet.java
        Commit graph MODIFY /icepush/trunk/core/src/main/javascript/application.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24569 Fri May 13 09:10:52 MDT 2011 mircea.toma ICE-6851 Create resources on the server side for each type of request that ICEpush can send to the server. Use the URIs of these resources to configure ICEpush bridge. Modified ICepushResourceHandler to properly handle all the request types. Removed ICEpushListenResource since the URI pattern strategy is not used anymore. Also the created resources are backed by existing resource files to avoid any complaints from JSF framework.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/lib/icepush.jar
        Commit graph DEL /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushListenResource.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources/create-push-id.icepush
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources/add-group-member.icepush
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletResponse.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources/remove-group-member.icepush
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources/notify.icepush
        Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/resources/META-INF/resources/listen.icepush
        Hide
        Mircea Toma added a comment - - edited

        Changed ICEpush code to use URIs constructed on the server side for the blocking connection, add-group-memeber, remove-group-member, notify and create-push-id commands. These URIs are defined in ICEpush JS configuration instead of constructing the URIs from a URI pattern (by just replacing the command token).

        Show
        Mircea Toma added a comment - - edited Changed ICEpush code to use URIs constructed on the server side for the blocking connection, add-group-memeber, remove-group-member, notify and create-push-id commands. These URIs are defined in ICEpush JS configuration instead of constructing the URIs from a URI pattern (by just replacing the command token).
        Hide
        Mircea Toma added a comment -

        Created resources on the server side for each type of request that ICEpush can send to the server. Use the URIs of these resources to configure ICEpush bridge. Modified ICepushResourceHandler to properly handle all the request types. Removed ICEpushListenResource since the URI pattern strategy is not used anymore. Also the created resources are backed by existing resource files to avoid any complaints from JSF framework.

        Show
        Mircea Toma added a comment - Created resources on the server side for each type of request that ICEpush can send to the server. Use the URIs of these resources to configure ICEpush bridge. Modified ICepushResourceHandler to properly handle all the request types. Removed ICEpushListenResource since the URI pattern strategy is not used anymore. Also the created resources are backed by existing resource files to avoid any complaints from JSF framework.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24575 Sat May 14 15:19:42 MDT 2011 mircea.toma ICE-6851 Create resources on the server side for each type of request that ICEpush can send to the server. Use the URIs of these resources to configure ICEpush bridge. Modified ICepushResourceHandler to properly handle all the request types. Removed ICEpushListenResource since the URI pattern strategy is not used anymore. Also the created resources are backed by existing resource files to avoid any complaints from JSF framework.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/lib/icepush.jar
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources/listen.icepush
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushListenResource.java
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources/create-push-id.icepush
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources/notify.icepush
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletResponse.java
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources/add-group-member.icepush
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
        Commit graph ADD /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/resources/META-INF/resources/remove-group-member.icepush
        Hide
        Mircea Toma added a comment -

        Applied fixes to 2.0.x-maintenance branch.

        Show
        Mircea Toma added a comment - Applied fixes to 2.0.x-maintenance branch.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24619 Wed May 18 07:18:18 MDT 2011 mircea.toma ICE-6851 Specify the content type when creating JSF resources to avoid generating warning messages for unknown file extensions.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Hide
        Mircea Toma added a comment -

        Specified the content type when creating JSF resources to avoid generating warning messages for unknown file extensions.

        Show
        Mircea Toma added a comment - Specified the content type when creating JSF resources to avoid generating warning messages for unknown file extensions.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24620 Wed May 18 14:48:55 MDT 2011 mircea.toma ICE-6851 Use up to date ice.push.configuration.blockingConnectionURI URL when making the requests for the blocking connection.
        Files Changed
        Commit graph MODIFY /icepush/trunk/core/src/main/java/org/icepush/ConfigurationServer.java
        Commit graph MODIFY /icepush/trunk/core/src/main/javascript/connection.async.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24682 Tue May 24 15:50:08 MDT 2011 ken.fyten ICE-6851: Committing icepush.jar that matches the icepush/branches/icepush-2.0.x-maintenance branch to fix EPS build error.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/lib/icepush.jar
        Hide
        Mircea Toma added a comment -

        Make ICEpush code to gracefully handle the configured context path. The code should work when the context path contains a '/' at the beginning of the path or not.

        Show
        Mircea Toma added a comment - Make ICEpush code to gracefully handle the configured context path. The code should work when the context path contains a '/' at the beginning of the path or not.
        Mircea Toma made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mircea Toma added a comment -

        Apply ICEpush changes also to ICEpush 2.0.x maintenance branch and then update the icepush.jar lib into the ICEfaces 2.0.x maintenance branch.

        Show
        Mircea Toma added a comment - Apply ICEpush changes also to ICEpush 2.0.x maintenance branch and then update the icepush.jar lib into the ICEfaces 2.0.x maintenance branch.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24693 Wed May 25 15:32:49 MDT 2011 mircea.toma ICE-6851 Normalize context path specified in web.xml so that the context path sent to the bridge will always start with one '/'.
        Files Changed
        Commit graph MODIFY /icepush/trunk/core/src/main/java/org/icepush/ConfigurationServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24694 Wed May 25 15:42:33 MDT 2011 mircea.toma ICE-6851 Use URIs constructed on the server side and defined in ICEpush JS configuration instead of constructing the URIs from a URI pattern by just replacing the command token.
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/javascript/application.js
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/java/org/icepush/servlet/BrowserBoundServlet.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24695 Wed May 25 15:45:11 MDT 2011 mircea.toma ICE-6851 Use up to date ice.push.configuration.blockingConnectionURI URL when making the requests for the blocking connection.
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/javascript/connection.async.js
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/java/org/icepush/ConfigurationServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24696 Wed May 25 15:45:45 MDT 2011 mircea.toma ICE-6851 Normalize context path specified in web.xml so that the context path sent to the bridge will always start with one '/'.
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/java/org/icepush/ConfigurationServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24698 Wed May 25 15:56:21 MDT 2011 mircea.toma ICE-6851 Handle case where contextPath is not configured.
        Files Changed
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/javascript/application.js
        Commit graph MODIFY /icepush/branches/icepush-2.0.x-maintenance/core/src/main/java/org/icepush/ConfigurationServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24699 Wed May 25 15:58:21 MDT 2011 mircea.toma ICE-6851 Handle case where contextPath is not configured.
        Files Changed
        Commit graph MODIFY /icepush/trunk/core/src/main/java/org/icepush/ConfigurationServer.java
        Commit graph MODIFY /icepush/trunk/core/src/main/javascript/application.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24700 Wed May 25 16:01:50 MDT 2011 mircea.toma ICE-6851 Updated icepush lib build from revision 24699.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/lib/icepush.jar
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24702 Wed May 25 16:06:19 MDT 2011 mircea.toma ICE-6851 Updated icepush lib build from 2.0.x maintenance branch, revision 24700.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/lib/icepush.jar
        Hide
        Mircea Toma added a comment -

        Normalized context path specified in web.xml so that the context path sent to the bridge will always start with one '/'.

        Show
        Mircea Toma added a comment - Normalized context path specified in web.xml so that the context path sent to the bridge will always start with one '/'.
        Hide
        Mircea Toma added a comment -

        Applied fixes to ICEpush 2.0.x maintenance branch and then updated icepush.jar in ICEfaces 2.0.x maintenance branch.

        Show
        Mircea Toma added a comment - Applied fixes to ICEpush 2.0.x maintenance branch and then updated icepush.jar in ICEfaces 2.0.x maintenance branch.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24779 Wed Jun 08 15:08:39 MDT 2011 mircea.toma ICE-6851 Modify controlRequest function to use the up to date ice.push.configuration.blockingConnectionURI URL.
        Files Changed
        Commit graph MODIFY /icepush/trunk/core/src/main/javascript/connection.async.js
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta [ 10291 ]
        Fix Version/s 2.1 [ 10241 ]
        Ken Fyten made changes -
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: