Bonjour,
J'ai réussi à exécuter un projet web implémentant jsf 1.2 et richfaces 3.3 en utilisant l'implémentation de jsf utilisé par défaut par JBOSS.
Ce que j'essaie de faire maintenant est d'utiliser mon propre implémentation de jsf en ajoutant les jar jsf-api.jar et jsf-imp.jar dans WEB-INF/lib de mon application .
voici tout le contenu de WEB-INF/lib :
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-api.jar
jsf-imp.jar
richfaces-api-3.3.0.GA.jar
richfaces-imp-3.3.0.GA.jar
richfaces-ui.3.3.0.GA.jar

j'ai ajouté un fichier jboss-web.xml dans mon WEB-INF qui contient :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
 
<jboss-web>
 <class-loading java2ClassLoadingCompliance="false">
 <loader-repository>
 com.example:archive=unique-archive-name
 <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
 </loader-repository>
 </class-loading>
</jboss-web>
Je désactive les listener de JBoss afin d'utiliser ma propre implémentation de JSF.

Extrait du wiki de jboss :

Remove the existing JSF implementation
First you need to remove the bundled JSF implementation. To do so you need to comment/remove the following from the web.xml found under jboss-4.2.0.GA\server\<config-name>\deploy\jboss-web.deployer\conf.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
<!-- Comment/Remove this -->
   <!-- Configures JSF for a web application if the javax.faces.webapp.FacesServlet is declared -->
   <!-- in web.xml.                                                                             -->
   <!--
   <listener>
     <listener-class>org.jboss.web.jsf.integration.config.JBossJSFConfigureListener</listener-class>
   </listener>
   -->
   <!-- Comment/Remove this -->
   <!-- Listens to all web app lifecycle events so that @PreDestroy can be called on -->
   <!-- JSF managed beans that go out of scope.  You can comment this out if you     -->
   <!-- don't use JSF or you don't use annotations on your managed beans.            -->
   <!--
   <listener>
     <listener-class>com.sun.faces.application.WebappLifecycleListener</listener-class>
   </listener>
   -->
Voici le contenu de mon web.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
 
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
 
<display-name>a4jEchoText</display-name>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>deepMarine</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Malheureusement, j'ai eu cette exception :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
exception
 
javax.servlet.ServletException: "Servlet.init()" pour la servlet Faces Servlet a généré une exception
	org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	java.lang.Thread.run(Thread.java:619)
 
cause mère
 
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
	org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	java.lang.Thread.run(Thread.java:619)

Merci d'avance