Bonjour,
J'ai crée un projet, dont le nom est Postage, via webProject, sous eclipse galilleo.
Les caracteristiques du Porjets sont
JSF 1.2
servlet version 2.5
lors de la declaration du serveur c'est JBOSS 5.0 (il ne me propose pas 5.1)
le serveur est JBoss 5.1
je demande l'adresse http://localhost:8080/Postage/getrequest.jsf, j'obtient le formulaire.
quand je valide le formulaire getrequest.xhtml (j'appui sur le bouttton commande) j'obtient le message suivant :


//******************************************************************************
Voici le messge d'erreur

13:22:23,972 WARNING [lifecycle] /getrequest.xhtml @27,63 value="#{r.weight}": Target Unreachable, identifier 'r' resolved to null
javax.el.PropertyNotFoundException: /getrequest.xhtml @27,63 value="#{r.weight}": Target Unreachable, identifier 'r' resolved to null
at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
at javax.faces.component.UIInput.validate(UIInput.java:868)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
at javax.faces.component.UIInput.processValidators(UIInput.java:672)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIForm.processValidators(UIForm.java:235)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)



//***********************************************************
voici le contenue de la classe annoté

import javax.annotation.Named;
import javax.context.RequestScoped;
import javax.inject.Current;

@Named("r")
@RequestScoped
public class Request {
private int weight;
private String patronCode;
@Current
private PostageService postageService;

public Request() {
}
// les getter et setter existe mais pas afficher ici
}

//**********************************************************
une partie du fichier getrequest.xhtml

<h:form id="f">
<h:panelGrid columns="2">
<h:outputText value="Weight:" />
<h:panelGroup>
<h:inputText id="w" value="#{r.weight}" label="weight"
required="true"
validatorMessage="weight cannot be negative!">
<f:validateLongRange minimum="0" />
</h:inputText>
<h:message for="w" errorClass="c1" />
</h:panelGroup>
<h:outputText value="Patron code:" />
<h:inputText value="#{r.patronCode}">
<x:validatePatron />
</h:inputText>
<h:outputText value="" />
<h:commandButton action="ok" value="OK">
<f:actionListener type="postage.RequestValidatingListener"/>
</h:commandButton>
</h:panelGrid>
</h:form>


//**********************************************************
le contenue de faces-config.xml

<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_2_0.xsd"
version="2.0">
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<message-bundle>postage.resources</message-bundle>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>fr_FR</supported-locale>
</locale-config>
</application>
<navigation-rule>
<from-view-id>/getrequest.xhtml</from-view-id>
<navigation-case>
<from-outcome>ok</from-outcome>
<to-view-id>/showpostage.xhtml
</to-view-id>
</navigation-case>
</navigation-rule>
<validator>
<validator-id>foo.v1</validator-id>
<validator-class>postage.PatronValidator</validator-class>
</validator>
</faces-config>



//**************************************
contenue de web.xml

<?xml version="1.0"?>
<web-app version="2.5" 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-app_2_5.xsd">
<display-name>Postage</display-name>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.REFRESH_PERIOD</param-name>
<param-value>2</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet Mapping -->
<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>

//***************************************
le contenue de WEB-INF/lib
common-annotations.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
jsf-facelets.jar
jsf-tlds.jar
jstl.jar
standard.jar

Je n'ai pas declaré un Managed Bean car j'utilise l'annotation.


Je vous remercie d'avance.