Hello,

Le parametre value="#{RegistrationBean.email}" ne s'affiche pas. Le champ email est vide:

voila ma JSF:

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
 
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
 
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
 
<%--
    This file is an entry point for JavaServer Faces application.
--%>
 
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <f:view>
            <h1><h:outputText value="JavaServer Faces" /></h1>
 
            <h:form >
                <h:outputText value="Adresse Email " /><h:inputText value="#{RegistrationBean.email}"/><br>
                <h:outputText value="Mot de Passe " /><h:inputSecret value="#{RegistrationBean.password}"/><br>
                <h:commandButton value="Connecter" />
            </h:form>
 
            <p><h:outputText value="#{param.test}" /></p>
            <p><h:outputText value="#{cookie.JSESSIONID.value}" /></p>
            <p><h:outputText value="#{facesContext.externalContext.requestPathInfo}" /></p>
            <p><h:outputText value="#{facesContext.externalContext.requestServletPath}" /></p>
 
        </f:view>
 
    </body>
</html>
Et ma classe 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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
package beanPackage;
 
/**
 *
 * @author Jinx
 */
public class RegistrationBean {
 
    private String email = "user@host";
    private String password = "";
 
    public String getEmail() {
//        return email;
        return "test@test.com";
    }
 
    public void setEmail(String t) {
        this.email = t;
    }
 
    public String getPassword() {
        return password;
    }
 
    public void setPassword(String t) {
        this.password = t;
    }
 
 
}
Merci de toute aide.

Jinx