JSF 2 Issues in Application Servers

For alternative JSF which you want to bundle to your Server, you have to confgure it as below:

  1. On WebSphere 5.x up to with the current 8.x you need to set the WAR and EAR classloader to PARENT_LAST in the WAS admin console whenever you want to bundle and use your own JSF impl in /WEB-INF/lib.
  2. On JBoss 4.x up to with the current 6.x it's sufficient to add the following context param to /WEB-INF/web.xml to suppress JBoss' builtin JSF deployer.
      <context-param> 
        
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name> 
         
    <param-value>true</param-value> 
      </context-param>
  3. On Glassfish 2.x up to with the current 3.x you need to add the following entries to the /WEB-INF/sun-web.xml (Eclipse with Glassfish plugin should autogenerate the template file if you create a web project with target runtime set to Glassfish).
      <class-loader delegate="false" /> 
      <property name="useBundledJsf" value="true" /> 
原文地址:https://www.cnblogs.com/zhangqingsh/p/2161519.html