ICEfaces
  1. ICEfaces
  2. ICE-4419

Purge use of environment specific APIs

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.8.1
    • Fix Version/s: None
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      JSF 2.0

      Description

      The components need to ensure that they are not doing any calls that are specific to a particular environment unless absolutely necessary. This is so that portlets can be properly supported without failing. For example, the DataExporterRenderer uses this call which would fail in a portlet environment:

      ServletContext context = ((HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false)) .getServletContext();

      The inputFile component currently uses another ICEfaces class called CommonEnvironmentRequest to abstract out the environmental differences but some methods are simply not supported in the Portlet API so it may not cover all cases. The work here is to use techniques that are environment agnostic so that all components can be run in portlets.

        Issue Links

          Activity

          Deryk Sinotte created issue -
          Deryk Sinotte made changes -
          Field Original Value New Value
          Environment Any JSF 2.0
          Salesforce Case []
          Mark Collette made changes -
          Link This issue depends on ICE-4367 [ ICE-4367 ]
          Hide
          Mark Collette added a comment -

          DataExporterRenderer.java

          private File createFile(FacesContext fc, UIData uiData, DataExporter oe) {

          OutputTypeHandler outputHandler = null;
          ServletContext context = ((HttpSession) FacesContext
          .getCurrentInstance().getExternalContext().getSession(false))
          .getServletContext();

          IncludeRenderer.java

          URLConnection includedConnection = includedURL.openConnection();
          includedConnection
          .setRequestProperty("Cookie",
          "JSESSIONID=" + ((HttpSession) context.getExternalContext()
          .getSession(false)).getId());

          Show
          Mark Collette added a comment - DataExporterRenderer.java private File createFile(FacesContext fc, UIData uiData, DataExporter oe) { OutputTypeHandler outputHandler = null; ServletContext context = ((HttpSession) FacesContext .getCurrentInstance().getExternalContext().getSession(false)) .getServletContext(); IncludeRenderer.java URLConnection includedConnection = includedURL.openConnection(); includedConnection .setRequestProperty("Cookie", "JSESSIONID=" + ((HttpSession) context.getExternalContext() .getSession(false)).getId());
          Ken Fyten made changes -
          Salesforce Case []
          Assignee Priority P2
          Affects Version/s 1.8.1 [ 10170 ]
          Affects Version/s 2.0 [ 10032 ]
          Security Private [ 10001 ]
          Assignee Adnan Durrani [ adnan.durrani ]
          Hide
          Adnan Durrani added a comment -

          I have looked at trunk date (9/19/2010). It came across that DataExporter already not using it.

          The include renderer still using HttpSession, as well as HttpServletRequest. In order to work on it I was trying to use jsp include. I can see that the page gets included but com.icesoft.faces.renderkit.IncludeRenderer was never get invoked. Here is my JSP page.

          </html>
          </head>
          <body>
          <jsp:include page="test.html" />
          </body>
          </html>

          Is this the right way of using it?

          Show
          Adnan Durrani added a comment - I have looked at trunk date (9/19/2010). It came across that DataExporter already not using it. The include renderer still using HttpSession, as well as HttpServletRequest. In order to work on it I was trying to use jsp include. I can see that the page gets included but com.icesoft.faces.renderkit.IncludeRenderer was never get invoked. Here is my JSP page. </html> </head> <body> <jsp:include page="test.html" /> </body> </html> Is this the right way of using it?
          Adnan Durrani made changes -
          Assignee Adnan Durrani [ adnan.durrani ] Ken Fyten [ ken.fyten ]
          Ken Fyten made changes -
          Assignee Ken Fyten [ ken.fyten ]
          Assignee Priority P2 [ 10011 ]
          Hide
          Ken Fyten added a comment -

          Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup.

          Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf

          If the issue persists with the current ICEfaces release, please create a new JIRA for it.

          Show
          Ken Fyten added a comment - Marking as Closed / Invalid as part of legacy ICEfaces 1.x, 2.x JIRA cleanup. Note: This issue may be resolved in a newer ICEfaces release, available here: http://www.icesoft.org/java/downloads/icefaces-downloads.jsf If the issue persists with the current ICEfaces release, please create a new JIRA for it.
          Ken Fyten made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Invalid [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: