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

Explicitly specify Mojarra ConfigureListener and Liferay Faces BridgeSessionListener in WEB-IN/web.xml descriptor of demo and issue portlets

    Details

      Description

      In order to take full advantage of the memory leak fixes of FACES-1470, it is necessary to explicitly specify the Mojarra ConfigureListener and the Liferay Faces BridgeSessionListener in the WEB-IN/web.xml descriptor of the demo portlets.

      But in order to make sure that it works with both Mojarra and MyFaces, we should enable filtering of the WEB-INF/web.xml deployment descriptor in the Maven POM, like this:

      <profiles>
          <profile>
              <id>mojarra</id>
              <properties>
                  <faces.impl.startup.listener>com.sun.faces.config.ConfigureListener</faces.impl.startup.listener>
              <properties>
              ...
          </profile>
          <profile>
              <id>myfaces</id>
              <properties>
                  <faces.impl.startup.listener>org.apache.myfaces.webapp.StartupServletContextListener</faces.impl.startup.listener>
              <properties>
              ...
          </profile>
      </profiles>
      ...
      <plugins>
          <plugin>
              <artifactId>maven-war-plugin</artifactId>
              <configuration>
                <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
              </configuration>
            </plugin>
      </plugins>
      

      Here is what the resulting markup would look like in the WEB-INF/web.xml descriptor of each demo portlet:

      <!-- Explicitly specify order of startup listeners so that Liferay Faces Bridge can cleanup managed-beans -->
      <listener>
      	<listener-class&gt;${faces.impl.startup.listener}</listener-class&gt;
      </listener>
      <listener>
      	<listener-class&gt;com.liferay.faces.bridge.servlet.BridgeSessionListener</listener-class&gt;
      </listener>
      

        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-2.1.2-ga3
                  liferay-faces-3.0.2-legacy-ga3
                  liferay-faces-3.0.2-ga3
                  liferay-faces-3.1.2-ga3