Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1892

Upgrade 4.x branches from JBoss-EL to Unified-EL 2.2

    Details

      Description

      Although JSF 2.0/2.1 was included with Java EE 6, there were no compile-time dependencies on classes/methods that were new to the Java EE 6 API. The result is that JSF 2.0/2.1 was runtime-compatible with Java EE 5 servers.

      Since the Unified-EL was not introduced until Java EE 6, it was necessary for the Liferay Faces demos (some of which pass parameters via EL) to use JBoss-EL in order to run on Servlet 2.5 containers like WebLogic 11g (10.3). Usage of JBoss-EL was used (Tomcat, Jetty, Resin JBoss, GlassFish, WebLogic, WebSphere) since it was a lowest-common-denominator that worked on all servers.

      Although JSF 2.2 was included with Java EE 7, there are no compile-time dependencies on classes/methods that were new to the Java EE 7 API. The result is that JSF 2.2 is runtime-compatible with Java EE 6 servers.

      Since the 4.x branches of Liferay Faces require JSF 2.2, we can now rely on the Unified-EL in all of the demo portlets. Therefore the following dependency on JBoss-EL:

      <dependency>
      	<groupId>org.jboss.seam</groupId>
      	<artifactId>jboss-el</artifactId>
      	<version>2.0.0.GA</version>
      	<exclusions>
      		<exclusion>
      			<groupId>javax.el</groupId>
      			<artifactId>el-api</artifactId>
      		</exclusion>
      	</exclusions>
      </dependency>
      

      ... can be replaced with:

      <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>el-impl</artifactId>
          <version>2.2</version>
      </dependency>
      

      And the following entry in WEB-INF/web.xml:

      <context-param>
      	<param-name>com.sun.faces.expressionFactory</param-name>
      	<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
      </context-param>
      

      ... can be replaced with:

      <context-param>
      	<param-name>com.sun.faces.expressionFactory</param-name>
      	<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
      </context-param>
      

      However, since Java EE 6 servers are required to ship with a default implementation of the EL 2.2 API, it might be possible to completely eliminate the pom.xml dependency and web.xml context-param described above. This is the approach that should be tried first.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  liferay-faces-4.2.5-ga6