bonjour je me met à jsf et j'ai commencé par cet exemple qui ne fonctionne pas
quelqu'un pourrait bien m'expliquer pourquoi?

voici mon web.xml:

Code xml : 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
<?xml version="1.0"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
 
    <display-name>test</display-name>
 
    <description>richfaces test</description>
 
        <context-param>
 
        <param-name>org.richfaces.SKIN</param-name>
 
        <param-value>blueSky</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>1</load-on-startup>
  </servlet>
 
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
 <login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>

la mon faces-config.xml:

Code xml : 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
<?xml version="1.0" encoding="UTF-8"?>
 
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
	version="1.2">
<managed-bean> 
     <managed-bean-name>helloBean</managed-bean-name> 
     <managed-bean-class>rich.HelloBean</managed-bean-class> 
     <managed-bean-scope>request</managed-bean-scope> 
     <managed-property>
<property-name>name</property-name>
<property-class>java.lang.String</property-class>
<value/>
</managed-property>
</managed-bean>
 
</faces-config>

mon bean:

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
package rich;
 
public class HelloBean {
	private String name; 
	public HelloBean(){
		name=" Nobody";
	}
    public String getName() { 
       return name; 
    } 
 
    public void setName(String name) { 
       this.name = name; 
    } 
 
}
J'ai deux pages la pricipale:

--hello.jsp--

Code xml : 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
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Ma page richfaces</title>
</head>
<body>
<f:view>
<a4j:form>
<rich:panel header="Test RichFaces" style="width: 350px">
<h:outputText value="Your name: " />
<h:inputText value="#{helloBean.name}" >
<f:validateLength minimum="1" maximum="30" />
</h:inputText>
<a4j:commandButton value="Get greeting" reRender="greeting" />
<h:panelGroup id="greeting" >
<h:outputText value="Hello, " rendered="#{not empty helloBean.name}" />
<h:outputText value="#{helloBean.name}" />
<h:outputText value="!" rendered="#{not empty helloBean.name}" />
</h:panelGroup>
</rich:panel>
</a4j:form>
</f:view>
</body>
</html>

et l'index
--index.jsp--

Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Refresh" content= "0; URL=hello.jsf"/>
<title>Insert title here</title>
</head>
<body>
	Démarage de l'application...
</body>
</html>

Bien sur les librairies que j'utilises sont:

commons-beanutils-1.7.0.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-discovery-0.4.jar
commons-logging-1.1.1.jar
myfaces-api-1.2.6.jar
myfaces-impl-1.2.6.jar
standard-1.1.2.jar
jstl-1.2.jar
et les trois jar de richfaces
richfaces-api-3.3.0.GA.jar
richfaces-impl-3.3.0.GA.jar
richfaces-ui-3.3.0.GA.jar
je suis sous windows xp sp2
et donc iexplrer 6.0
lorsque je lance l'application (http://localhost:8080/richtest/index.jsp) je suis correctement dirigé à la page hello.jsf
cependant lorsque je click sur le boutton voici l'erreur obtenue:

An Error Occurred:
Exception while validating component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /hello.jsp][Class: org.ajax4jsf.component.html.AjaxForm,Id: j_id_jsp_918357331_1][Class: org.richfaces.component.html.HtmlPanel,Id: j_id_jsp_918357331_2][Class: org.richfaces.component.html.HtmlInputText,Id: j_id_jsp_918357331_4]}

Caused by:
org.apache.jasper.el.JspPropertyNotFoundException - /hello.jsp(17,0) '#{helloBean.name}' Target Unreachable, identifier 'helloBean' resolved to null
+- Stack Trace
javax.faces.FacesException: Exception while validating component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /hello.jsp][Class: org.ajax4jsf.component.html.AjaxForm,Id: j_id_jsp_918357331_1][Class: org.richfaces.component.html.HtmlPanel,Id: j_id_jsp_918357331_2][Class: org.richfaces.component.html.HtmlInputText,Id: j_id_jsp_918357331_4]}
at javax.faces.component.UIInput.validate(UIInput.java:420)
at javax.faces.component.UIInput.processValidators(UIInput.java:185)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:726)
at org.ajax4jsf.component.UIAjaxForm.processValidators(UIAjaxForm.java:80)
at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:151)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.jasper.el.JspPropertyNotFoundException: /hello.jsp(17,0) '#{helloBean.name}' Target Unreachable, identifier 'helloBean' resolved to null
at org.apache.jasper.el.JspValueExpression.getType(JspValueExpression.java:61)
at org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.findUIOutputConverter(_SharedRendererUtils.java:58)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.findUIOutputConverter(RendererUtils.java:391)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getConvertedUIOutputValue(RendererUtils.java:752)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.getConvertedValue(HtmlTextRendererBase.java:219)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:455)
at javax.faces.component.UIInput.validate(UIInput.java:399)
... 28 more
+- Component Tree
<AjaxViewRoot id=" immediate=" locale=" renderKitId=" renderRegionOnly=" rendered=" selfRendered=" submitted=" transient=" viewId=">
<AjaxForm ajaxSingle=" ajaxSubmit=" bypassUpdates=" id=" ignoreDupResponses=" limitToList=" prependId=" rendered=" requestDelay=" submitted=" timeout=" transient=">
<HtmlPanel header=" id=" rendered=" style=" transient=">
<HtmlOutputText escape=" id=" rendered=" transient=" value="/>
<HtmlInputText disabled=" id=" immediate=" localValueSet=" maxlength=" readonly=" rendered=" required=" size=" submittedValue=" transient=" valid="/>
<HtmlAjaxCommandButton ajaxSingle=" bypassUpdates=" disabled=" id=" ignoreDupResponses=" immediate=" limitToList=" reRender=" rendered=" requestDelay=" size=" timeout=" transient=" value="/>
<HtmlPanelGroup id=" rendered=" transient=">
<HtmlOutputText escape=" id=" rendered=" transient=" value="/>
<HtmlOutputText escape=" id=" rendered=" transient="/>
<HtmlOutputText escape=" id=" rendered=" transient=" value="/>
</HtmlPanelGroup>
</HtmlPanel>
</AjaxForm>
</AjaxViewRoot>
+- Scoped Variables
Request Parameters Name Value
AJAXREQUEST j_id_jsp_918357331_0
autoScroll
j_id_jsp_918357331_1 j_id_jsp_918357331_1
j_id_jsp_918357331_1:j_id_jsp_918357331_4
j_id_jsp_918357331_1:j_id_jsp_918357331_5 j_id_jsp_918357331_1:j_id_jsp_918357331_5
Request Attributes Name Value
ajaxContext org.ajax4jsf.context.AjaxContextImpl@1c8f91e
Session Attributes Name Value
None
Application Attributes Name Value
None
so c'est koi mon problème?????
Merci de vous y interessé.