Bonsoir tous;
J'ai une interface d'authentification, avec jsf et j'ai un probleme d'authentification, je vous donne ci dessous le code ainsi que le son bean,
authentification.xhtml
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
    <h:head>
    </h:head>
    <h:body>
 
        <p:panel header="Authentification">
       <h1> Connectez-vous à votre compte </h1> 
            <h:form> 
            	<h:panelGrid columns="3" cellpadding="2" >
            	         <h:outputLabel for="login" value="Login" />
<h:inputText   value="#{personnelBean.prsnl.login}" label="login" required="true" /> 	
						<h:message for="login" />
						<h:outputLabel for="password" value="Password" />
<h:inputSecret   value="#{personnelBean.prsnl.password}" label="Password" required="true" /> 	
						<h:message for="password" />
						<p:commandButton action="#{personnelBean.connectpersonne}" value="Connexion" />
						<p:commandButton type="reset" value="Annuler" /><br /><br></br>
					<h:commandLink action ="verification">
					<h:outputLabel  value="Mot de passe oublié ?" />
					 </h:commandLink>	
						</h:panelGrid></h:form></p:panel></h:body>
 
</html>
et son bean est;
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
@ManagedBean
@SessionScoped
public class PersonnelBean  implements Serializable{
	/**
         * 
         */
	private static final long serialVersionUID = 1L;
	private Personnel prsnl=new Personnel();
	Personneldao prsldao=new Personneldao();
	private String logn="admin";
	private String pswd="admin";
	/*******************************************************/
	public String connectpersonne(){
		Personnel result= prsldao.connectpersonne(prsnl.getLogin(),prsnl.getPassword());
		if(result!=null){
         return " Succes de connexion ";
		}
	FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("login ou mot de passe faux"));		
		return null;
 
			}
}
et voici l'erreur retournée:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
févr. 01, 2015 3:20:49 PM com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
AVERTISSEMENT: Impossible de détecter le composant dont l’ID est «login» dans la vue.
févr. 01, 2015 3:20:49 PM com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
AVERTISSEMENT: Impossible de détecter le composant dont l’ID est «login» dans la vue.
févr. 01, 2015 3:20:49 PM com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
AVERTISSEMENT: Impossible de détecter le composant dont l’ID est «password» dans la vue.
févr. 01, 2015 3:20:49 PM com.sun.faces.renderkit.html_basic.HtmlBasicRenderer getForComponent
AVERTISSEMENT: Impossible de détecter le composant dont l’ID est «password» dans la vue.
y a-t-il une idée? .Merci