ICEfaces
  1. ICEfaces
  2. ICE-9842

ClassCastException thrown when loading non-ICEfaces pages

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P07
    • Fix Version/s: EE-1.8.2.GA_P08
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Woodstock
    • Assignee Priority:
      P2
    • Salesforce Case Reference:

      Description

      From the changes made in ICE-7941 a ClassCastException is thrown when accessing a non-ICEfaces page. In the customers use case they have some old Woodstock components on these pages.

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        The following code fix has been confirmed by the customer:

        private String getContextPath(ExternalContext extContext) {
        if (contextPath == null) {
        ServletContext servletContext = (ServletContext) extContext.getContext();
        String publicContextPath = servletContext.getInitParameter("publicContextPath");
        if (null != publicContextPath)

        { contextPath = publicContextPath; }

        else

        { contextPath = extContext.getRequestContextPath(); }

        // Configuration configuration = ((BridgeExternalContext) extContext).getConfiguration();
        // contextPath = configuration.getAttribute("publicContextPath", extContext.getRequestContextPath());
        if (!contextPath.startsWith("/"))

        { contextPath = "/" + contextPath; }

        if (contextPath.endsWith("/"))

        { contextPath = contextPath.substring(0, contextPath.length() - 1); }

        }

        return contextPath;
        }

        Show
        Arran Mccullough added a comment - The following code fix has been confirmed by the customer: private String getContextPath(ExternalContext extContext) { if (contextPath == null) { ServletContext servletContext = (ServletContext) extContext.getContext(); String publicContextPath = servletContext.getInitParameter("publicContextPath"); if (null != publicContextPath) { contextPath = publicContextPath; } else { contextPath = extContext.getRequestContextPath(); } // Configuration configuration = ((BridgeExternalContext) extContext).getConfiguration(); // contextPath = configuration.getAttribute("publicContextPath", extContext.getRequestContextPath()); if (!contextPath.startsWith("/")) { contextPath = "/" + contextPath; } if (contextPath.endsWith("/")) { contextPath = contextPath.substring(0, contextPath.length() - 1); } } return contextPath; }
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000ZvtDEAAZ
        Ken Fyten made changes -
        Assignee Mircea Toma [ mircea.toma ]
        Fix Version/s EE-1.8.2.GA_P08 [ 11178 ]
        Assignee Priority P2 [ 10011 ]
        Hide
        Brett Bergquist added a comment -

        Actually we don't have pages with a mixture of Woodstock and ICEFaces, but rather an application that has pages that have Woodstock components and pages that have ICEFaces components. However, both pages are served through ICEfaces ViewHandler.

        Show
        Brett Bergquist added a comment - Actually we don't have pages with a mixture of Woodstock and ICEFaces, but rather an application that has pages that have Woodstock components and pages that have ICEFaces components. However, both pages are served through ICEfaces ViewHandler.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #41287 Wed Jun 04 13:38:19 MDT 2014 mircea.toma ICE-9842 Modified getContextPath method to use the generic ExternalContext instead of the custom Configuration object to read "com.icesoft.faces.publicContextPath" context parameter.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
        Hide
        Mircea Toma added a comment - - edited

        Modified D2DViewHandler.getContextPath method to use the generic ExternalContext instead of the custom Configuration object to read com.icesoft.faces.publicContextPath context parameter.

        Show
        Mircea Toma added a comment - - edited Modified D2DViewHandler.getContextPath method to use the generic ExternalContext instead of the custom Configuration object to read com.icesoft.faces.publicContextPath context parameter.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: