ICEfaces
  1. ICEfaces
  2. ICE-8902

ExternalContext.isSecure method is not overridden in portlet bridges

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2, EE-3.2.0.BETA
    • Fix Version/s: EE-3.2.0.GA, 3.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Portlets, ACE GMap Component
    • Assignee Priority:
      P1

      Description

      When running in a portlet, the following exception is thrown when the GMapResourceHandler is run and the isSecure method is called:

      java.lang.UnsupportedOperationException
          at javax.faces.context.ExternalContext.isSecure(ExternalContext.java:1932)

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33131 Fri Jan 18 15:04:03 MST 2013 deryk.sinotte ICE-8902: handle ExternalContext.isSecure calls in cases where an older version of the portlet bridge has not overridden it
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletRequest.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapResourceHandler.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java
        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        The ExternalContext.isSecure method is called by the GMapResourceHandler to determine whether the http or https protocol should be used to load the Google Maps API library. The problem stems from the fact that the portlet bridges' (both the PortletFaces and LiferayFaces versions) ExternalContext implementations do not override the isSecure method. ExternalContext.isSecure was only added in JSF 2.1 and the bridges are compile against JSF 2.0. I've contacted the LiferayFaces developer and they will be fixing it in a future release but in the meantime, we need to address this ourselves.

        Show
        Deryk Sinotte added a comment - The ExternalContext.isSecure method is called by the GMapResourceHandler to determine whether the http or https protocol should be used to load the Google Maps API library. The problem stems from the fact that the portlet bridges' (both the PortletFaces and LiferayFaces versions) ExternalContext implementations do not override the isSecure method. ExternalContext.isSecure was only added in JSF 2.1 and the bridges are compile against JSF 2.0. I've contacted the LiferayFaces developer and they will be fixing it in a future release but in the meantime, we need to address this ourselves.
        Deryk Sinotte made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Environment Portlets GMap Portlets, ACE GMap Component
        Ken Fyten made changes -
        Affects Version/s 3.2 [ 10338 ]
        Affects Version/s 3.3 [ 10370 ]
        Ken Fyten made changes -
        Fix Version/s 3.3 [ 10370 ]
        Ken Fyten made changes -
        Assignee Priority P1 [ 10010 ]
        Hide
        Deryk Sinotte added a comment -

        I changed the call so that the GMapResourceHandler now calls EnvUtils.isSecure(). This is a new method that tries to call ExternalContext.isSecure but, if that fails with an UnsupportedOperationException, tries to safely use the HttpServletRequest or PortletRequest via reflection. Resolving as fixed.

        Show
        Deryk Sinotte added a comment - I changed the call so that the GMapResourceHandler now calls EnvUtils.isSecure(). This is a new method that tries to call ExternalContext.isSecure but, if that fails with an UnsupportedOperationException, tries to safely use the HttpServletRequest or PortletRequest via reflection. Resolving as fixed.
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: