IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JSF Java Discussion :

Probleme avec jsf et jboss 5


Sujet :

JSF Java

  1. #1
    Membre éclairé Avatar de Philcmoi
    Homme Profil pro
    Inscrit en
    Juillet 2006
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 666
    Par défaut Probleme avec jsf et jboss 5
    voici mon formulaire:
    Tout les champs doivent etre remplis Login:
    Password: Les passwords doivent etre semblable
    Password: Les passwords doivent etre semblable
    Email:
    Nom:
    Prenom:
    Adresse:
    Code Postal:
    Pay:



    Quand je rempli tout il y a les log suivants:
    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
    Etat HTTP 500 - 
     
    --------------------------------------------------------------------------------
     
    type Rapport d'exception
     
    message 
     
    description Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.
     
    exception 
     
    javax.servlet.ServletException: /Enregistrement.jsp(16,11) '#{EnregistrementCandidat.Login}' Target Unreachable, identifier 'EnregistrementCandidat' resolved to null
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
     
    cause m�re 
     
    org.apache.jasper.el.JspPropertyNotFoundException: /Enregistrement.jsp(16,11) '#{EnregistrementCandidat.Login}' Target Unreachable, identifier 'EnregistrementCandidat' resolved to null
    	org.apache.jasper.el.JspValueExpression.getType(JspValueExpression.java:61)
    	com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
    	javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
    	javax.faces.component.UIInput.validate(UIInput.java:868)
    	javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
    	javax.faces.component.UIInput.processValidators(UIInput.java:672)
    	javax.faces.component.UIForm.processValidators(UIForm.java:235)
    	javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
    	javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:700)
    	com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
    	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
     
    note La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de JBoss Web/2.1.2.GA.
    Pourriez vous m'aider merci car je ne vois pas ou est le problème.

  2. #2
    Membre éclairé Avatar de argonath
    Homme Profil pro
    Ingénieur d'Etudes
    Inscrit en
    Juillet 2009
    Messages
    248
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'Etudes
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2009
    Messages : 248
    Par défaut
    javax.servlet.ServletException: /Enregistrement.jsp(16,11) '#{EnregistrementCandidat.Login}' Target Unreachable, identifier 'EnregistrementCandidat' resolved to null
    est ce que le bean EnregistrementCandidat est bien déclaré dans le faces-config ?

    ce message d'erreur signifie qu'il n'y a pas d'objet instancié de la class java correspondant à ce bean

  3. #3
    Membre éclairé Avatar de Philcmoi
    Homme Profil pro
    Inscrit en
    Juillet 2006
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 666
    Par défaut
    Je ne comprend pas, j'ai actuellement ca comme logs d'erreures.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    15:20:43,140 ERROR [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /Depart.jsp) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@7020d4]
    15:20:43,140 ERROR [[Faces Servlet]] "Servlet.service()" pour la servlet Faces Servlet a lanc� une exception
    com.sun.faces.mgbean.ManagedBeanCreationException: Unable to create managed bean enregistrementCandidat.  The following problems were found:
         - Property Adresse for managed bean enregistrementCandidat does not exist.
         - Property Cp for managed bean enregistrementCandidat does not exist.
         - Property Email for managed bean enregistrementCandidat does not exist.
         - Property Idclient for managed bean enregistrementCandidat does not exist.
         - Property Login for managed bean enregistrementCandidat does not exist.
         - Property Nom for managed bean enregistrementCandidat does not exist.
         - Property Password for managed bean enregistrementCandidat does not exist.
         - Property Passwordconfirme for managed bean enregistrementCandidat does not exist.
         - Property Pay for managed bean enregistrementCandidat does not exist.
         - Property Prenom for managed bean enregistrementCandidat does not exist.
    Or je déclare le managed bean enregistrementCandidat de la classe EnregistrementCandidat suivant:
    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
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
     
     
    import java.io.*;
    import java.net.URLEncoder;
    import java.util.*;
     
    import java.lang.*;
     
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.Store;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.servlet.http.Cookie;
    import javax.servlet.http.HttpServletRequest;
     
    import org.hibernate.Query;
    import org.hibernate.Transaction;
    import org.hibernate.Session;
     
    import sun.util.calendar.BaseCalendar.Date;
     
     
    public class EnregistrementCandidat {
     
    	private Exception exception = new Exception();
    	private Date dateinscription;
     
     
     
    	private Calendar calendar;
    	private String Login;
    	private String Password;
    	private String Passwordconfirme;
    	private String Email;
    	private String Nom;
    	private String Prenom;
    	private Integer Idclient;
    	private String Adresse;
    	private String Cp;
    	private String Pay;
     
    	public EnregistrementCandidat() {}
     
     
    	public String enregistrer() {
     
    		Client client = new Client();
     
    		try {
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("select max(idclient) from client");
    			;client.setIdClient(( (Integer) query1.list().get(0))+Integer.valueOf(1));
    		} catch (Exception e) {client.setIdClient(Integer.valueOf(1));}
    		System.err.println("AVANT LOGIN");
    		client.setLogin(getLogin());
    		client.setPassword(getPassword());
    		client.setPasswordConfirme(getPasswordconfirme());
    		client.setEmail(getEmail());
    		client.setConfirme(0);
    		client.setNom(getNom());
    		client.setPrenom(getPrenom());
    		client.setAdresse(getAdresse());
    		client.setCp(getCp());
    		client.setPay(getPay());
    //		client.setSex(getSex());
    //		client.setAge(getAge());
    //		client.setProfession(getProfession());
    //		client.setDepartement(getDepartement());
    		calendar =Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
    		calendar.get(Calendar.YEAR);calendar.get(Calendar.MONTH);calendar.get(Calendar.DAY_OF_MONTH);
    		client.setDateInscription(calendar.getTime());
    		//client.setParticipers(null);		
     
    //		client.setSalon(null);
     
    		try{
    		verifLogin();verifEmail();Confirmation(getEmail(), getIdclient());
     
    		Session session = HibernateUtil.getSessionFactory().openSession();
     
    		Transaction tx =  session.beginTransaction();
     
     
    		session.save(client);
     
    		tx.commit();
     
    		session.close();
     
     
    		if (!client.getPassword().equals(client.getPasswordConfirme())) {return "";} 
    		else return "index";
    		} catch (Exception e) {e.getMessage();}return "";}
     
    		public void Confirmation(String email, Integer id) throws Exception {
    			String emailfrom = "anewhope@anewhope.eu";
    			String emailto = email;
     
    			// Récupére les propriétés du systéme
    			Properties props = System.getProperties();
     
    			// Spécification du serveur mail
    			props.put("mail.smtp.host", "smtp.bbox.fr");
     
    			// Récupère la session
    			javax.mail.Session session = javax.mail.Session.getDefaultInstance(props, null);
     
    			// Définition du message
    			MimeMessage message = new MimeMessage(session);
    			//Spécification de l'expéditeur
    			try {
    				message.setFrom(new InternetAddress(emailfrom));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Spécification du destinataire
    			try {
    				message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailto));
    			} catch (Exception e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();message();
    				throw exception;
    			} 
    			//Sujet du message
    			try {
    				message.setSubject("www.anewhope.eu Utilisateurs");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Texte du message
     
    			String url = "http://www.petitsitejava.org/servlet/Confirmationclient?email="+email;
     
     
    			String htmlText="<html><head><title>message.html</title>"+"<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">"
    			+"<meta http-equiv=\"description\" content=\"this is my page\"><meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">"+
    		    "<!--<link rel=\"stylesheet\" type=\"text/css\" href=\"./styles.css\">--></head><body><p>&nbsp;Merci de vous etes inscrit sur anewhope.eu.</p>"+
    		  "<p>Votre adrese email est :"+email+"</p>"+
    		  "<p>veuilliez cliquer sur ce lien pour confirmer votre inscription :<A HREF=\""+url +"\">ici</A></body></html>";
    			//<a href="mailto:?to=adresse1@serveur.com%2C%20adresse2@serveur.com &cc=adresseCopie@serveur.com &subject=Sujet%20du%20message"> Test de mailto </a>
     
     
     
    		try {
    				message.setContent(htmlText, "text/html");
    			} catch (MessagingException e1) {
    				// TODO Auto-generated catch block
    				e1.printStackTrace();
    			}
     
     
    			/*try {
    				message.setText(htmlText, "text/html");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}*/
    			// Envoie le message
    			try {
    				Transport.send(message);
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();message();
    				throw exception;
    			}
     
     
    			// try catch au cas ou l'email est faux
     
     
    			}
     
    		public void confirmationMessage(String email)  {
    			try {String emailfrom = "anewhope@anewhope.eu";
    			String emailto = email;
     
    			// Récupére les propriétés du systéme
    			Properties props = System.getProperties();
     
    			// Spécification du serveur mail
    			props.put("mail.smtp.host", "smtp.free.fr");
     
    			// Récupère la session
    			javax.mail.Session session = javax.mail.Session.getDefaultInstance(props, null);
     
    			// Définition du message
    			MimeMessage message = new MimeMessage(session);
    			//Spécification de l'expéditeur
    			try {
    				message.setFrom(new InternetAddress(emailfrom));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Spécification du destinataire
    			try {
    				message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailto));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Sujet du message
    			try {
    				message.setSubject("www.anewhope.eu Utilisateurs");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Texte du message
    			String htmlText="<html><head><title>message.html</title>"+"<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">"
    			+"<meta http-equiv=\"description\" content=\"this is my page\"><meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">"+
    		    "<!--<link rel=\"stylesheet\" type=\"text/css\" href=\"./styles.css\">--></head><body><p>&nbsp;Merci de vous etes inscrit sur anewhope.eu.</p>"+
    		  "<Strong>VOUS ETES BIEN INSCRIT</Strong>" +
    		  "<p>Votre adrese email est :"+email+"</p><p>Vous serez contacter par mail pour participer &agrave; une &eacute;valuation marketing r&eacute;nmun&eacute;r&eacute;e.</p></body></html>"
    		  ;
    			//<a href="mailto:?to=adresse1@serveur.com%2C%20adresse2@serveur.com &cc=adresseCopie@serveur.com &subject=Sujet%20du%20message"> Test de mailto </a>
     
     
     
    		try {
    				message.setContent(htmlText, "text/html");
    			} catch (MessagingException e1) {
    				// TODO Auto-generated catch block
    				e1.printStackTrace();
    			}
     
     
    			/*try {
    				message.setText(htmlText, "text/html");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}*/
    			// Envoie le message
    			try {
    				Transport.send(message);
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
     
     
    			// try catch au cas ou l'email est faux
     
    			}catch (Exception e) {System.out.println("L'email est peut etre faux"+e.getMessage());}
     
    		}
     
    		public void verifLogin() throws Exception {
     
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("from client as c where c.login like '"+getLogin()+"'");
    			List clientL = query1.list();
    			session.close();
    			if (clientL.size()!=0) {FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("login");
    			facesMessage.setDetail("Login Existant:Choisisez un autre");
    			context.addMessage("form1:Login", facesMessage);throw exception;}
    			}
     
    		public void verifEmail() throws Exception {
     
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("from client as c where c.email like '"+getEmail()+"'");
    			List clientL = query1.list();
    			session.close();
    			if (clientL.size()!=0) {FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("Email");
    			facesMessage.setDetail("Email Existant:Choisisez un autre");
    			context.addMessage("form1:Email", facesMessage);throw exception;}
    			}
     
     
    		public void  message() {
    			FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("Email");
    			facesMessage.setDetail("faux Email");
    			context.addMessage("form1:Email", facesMessage);}
     
     
    		public java.lang.String getAdresse() {
    		return Adresse;
    	}
     
     
    		public void setAdresse(java.lang.String Adresse) {
    		this.Adresse = Adresse;
    	}
     
     
    		public java.lang.String getCp() {
    		return Cp;
    	}
     
     
    		public void setCp(java.lang.String Cp) {
    		this.Cp = Cp;
    	}
     
     
    		public java.lang.String getEmail() {
    		return Email;
    	}
     
     
    		public void setEmail(java.lang.String Email) {
    		this.Email = Email;
    	}
     
     
    		public java.lang.Integer getIdclient() {
    		return Idclient;
    	}
     
     
    		public void setIdclient(java.lang.Integer Idclient) {
    		this.Idclient = Idclient;
    	}
     
     
    		public java.lang.String getLogin() {
    		return Login;
    	}
     
     
    		public void setLogin(java.lang.String Login) {
    		this.Login = Login;
    	}
     
     
    		public java.lang.String getNom() {
    		return Nom;
    	}
     
     
    		public void setNom(java.lang.String Nom) {
    		this.Nom = Nom;
    	}
     
     
    		public java.lang.String getPassword() {
    		return Password;
    	}
     
     
    		public void setPassword(java.lang.String Password) {
    		this.Password = Password;
    	}
     
     
    		public java.lang.String getPasswordconfirme() {
    		return Passwordconfirme;
    	}
     
     
    		public void setPasswordconfirme(java.lang.String Passwordconfirme) {
    		this.Passwordconfirme = Passwordconfirme;
    	}
     
     
    		public java.lang.String getPay() {
    		return Pay;
    	}
     
     
    		public void setPay(java.lang.String Pay) {
    		this.Pay = Pay;
    	}
     
     
    		public java.lang.String getPrenom() {
    		return Prenom;
    	}
     
     
    		public void setPrenom(java.lang.String Prenom) {
    		this.Prenom = Prenom;
    	}
     
     
    		public java.util.Calendar getCalendar() {
    		return calendar;
    	}
     
     
    		public void setCalendar(java.util.Calendar calendar) {
    		this.calendar = calendar;
    	}
     
     
    		public sun.util.calendar.BaseCalendar.Date getDateinscription() {
    		return dateinscription;
    	}
     
     
    		public void setDateinscription(
    			sun.util.calendar.BaseCalendar.Date dateinscription) {
    		this.dateinscription = dateinscription;
    	}
     
     
    		public java.lang.Exception getException() {
    		return exception;
    	}
     
     
    		public void setException(java.lang.Exception exception) {
    		this.exception = exception;
    	}
     
     
    }

  4. #4
    Membre éclairé Avatar de Philcmoi
    Homme Profil pro
    Inscrit en
    Juillet 2006
    Messages
    666
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 666
    Par défaut Pbl incompréhensible jsf jnoss tool
    voici le managed 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
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
     
     
    import java.util.Calendar;
    import java.util.List;
    import java.util.Locale;
    import java.util.Properties;
    import java.util.TimeZone;
     
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.Store;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import javax.servlet.http.Cookie;
    import javax.servlet.http.HttpServletRequest;
     
    import org.hibernate.Query;
    import org.hibernate.Session;
    import org.hibernate.Transaction;
     
     
     
    /**
     * @author Philippe
     *
     */
    public class EnregistrementCandidat {
    	java.lang.String Adresse;
    	java.lang.String Cp;
    	String Email;
    	java.lang.Integer Idclient;
    	java.lang.String Login;
    	java.lang.String Nom;
    	java.lang.String Prenom;
    	java.util.Calendar calendar;
    	java.util.Date dateinscription;
    	java.lang.Exception exception;
    	java.lang.String Password;
    	java.lang.String Passwordconfirme;
    	java.lang.String Pay;
     
    	public EnregistrementCandidat() {
    	}
     
     
     
    public String enregistrer() {
     
    		Client client = new Client();
     
    		try {
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("select max(idclient) from client");
    			;client.setIdClient(( (Integer) query1.list().get(0))+Integer.valueOf(1));
    		} catch (Exception e) {client.setIdClient(Integer.valueOf(1));}
    		System.err.println("AVANT LOGIN");
    		client.setLogin(getLogin());
    		client.setPassword(getPassword());
    		client.setPasswordConfirme(getPasswordconfirme());
    		client.setEmail(getEmail());
    		client.setConfirme(0);
    		client.setNom(getNom());
    		client.setPrenom(getPrenom());
    		client.setAdresse(getAdresse());
    		client.setCp(getCp());
    		client.setPay(getPay());
    //		client.setSex(getSex());
    //		client.setAge(getAge());
    //		client.setProfession(getProfession());
    //		client.setDepartement(getDepartement());
    		calendar =Calendar.getInstance(TimeZone.getDefault(),Locale.getDefault());
    		calendar.get(Calendar.YEAR);calendar.get(Calendar.MONTH);calendar.get(Calendar.DAY_OF_MONTH);
    		client.setDateInscription(calendar.getTime());
    		//client.setParticipers(null);		
     
    //		client.setSalon(null);
     
    		try{
    		verifLogin();verifEmail();Confirmation(getEmail(), getIdclient());
     
    		Session session = HibernateUtil.getSessionFactory().openSession();
     
    		Transaction tx =  session.beginTransaction();
     
     
    		session.save(client);
     
    		tx.commit();
     
    		session.close();
     
     
    		if (!client.getPassword().equals(client.getPasswordConfirme())) {return "";} 
    		else return "index";
    		} catch (Exception e) {e.getMessage();}return "";}
     
    		public void Confirmation(String email, Integer id) throws Exception {
    			String emailfrom = "anewhope@anewhope.eu";
    			String emailto = email;
     
    			// Récupére les propriétés du systéme
    			Properties props = System.getProperties();
     
    			// Spécification du serveur mail
    			props.put("mail.smtp.host", "smtp.bbox.fr");
     
    			// Récupère la session
    			javax.mail.Session session = javax.mail.Session.getDefaultInstance(props, null);
     
    			// Définition du message
    			MimeMessage message = new MimeMessage(session);
    			//Spécification de l'expéditeur
    			try {
    				message.setFrom(new InternetAddress(emailfrom));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Spécification du destinataire
    			try {
    				message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailto));
    			} catch (Exception e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();message();
    				throw exception;
    			} 
    			//Sujet du message
    			try {
    				message.setSubject("www.anewhope.eu Utilisateurs");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Texte du message
     
    			String url = "http://www.petitsitejava.org/servlet/Confirmationclient?email="+email;
     
     
    			String htmlText="<html><head><title>message.html</title>"+"<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">"
    			+"<meta http-equiv=\"description\" content=\"this is my page\"><meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">"+
    		    "<!--<link rel=\"stylesheet\" type=\"text/css\" href=\"./styles.css\">--></head><body><p>&nbsp;Merci de vous etes inscrit sur anewhope.eu.</p>"+
    		  "<p>Votre adrese email est :"+email+"</p>"+
    		  "<p>veuilliez cliquer sur ce lien pour confirmer votre inscription :<A HREF=\""+url +"\">ici</A></body></html>";
    			//<a href="mailto:?to=adresse1@serveur.com%2C%20adresse2@serveur.com &cc=adresseCopie@serveur.com &subject=Sujet%20du%20message"> Test de mailto </a>
     
     
     
    		try {
    				message.setContent(htmlText, "text/html");
    			} catch (MessagingException e1) {
    				// TODO Auto-generated catch block
    				e1.printStackTrace();
    			}
     
     
    			/*try {
    				message.setText(htmlText, "text/html");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}*/
    			// Envoie le message
    			try {
    				Transport.send(message);
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();message();
    				throw exception;
    			}
     
     
    			// try catch au cas ou l'email est faux
     
     
    			}
     
    		public void confirmationMessage(String email)  {
    			try {String emailfrom = "anewhope@anewhope.eu";
    			String emailto = email;
     
    			// Récupére les propriétés du systéme
    			Properties props = System.getProperties();
     
    			// Spécification du serveur mail
    			props.put("mail.smtp.host", "smtp.free.fr");
     
    			// Récupère la session
    			javax.mail.Session session = javax.mail.Session.getDefaultInstance(props, null);
     
    			// Définition du message
    			MimeMessage message = new MimeMessage(session);
    			//Spécification de l'expéditeur
    			try {
    				message.setFrom(new InternetAddress(emailfrom));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Spécification du destinataire
    			try {
    				message.addRecipient(Message.RecipientType.TO, new InternetAddress(emailto));
    			} catch (AddressException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Sujet du message
    			try {
    				message.setSubject("www.anewhope.eu Utilisateurs");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    			//Texte du message
    			String htmlText="<html><head><title>message.html</title>"+"<meta http-equiv=\"keywords\" content=\"keyword1,keyword2,keyword3\">"
    			+"<meta http-equiv=\"description\" content=\"this is my page\"><meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\">"+
    		    "<!--<link rel=\"stylesheet\" type=\"text/css\" href=\"./styles.css\">--></head><body><p>&nbsp;Merci de vous etes inscrit sur anewhope.eu.</p>"+
    		  "<Strong>VOUS ETES BIEN INSCRIT</Strong>" +
    		  "<p>Votre adrese email est :"+email+"</p><p>Vous serez contacter par mail pour participer &agrave; une &eacute;valuation marketing r&eacute;nmun&eacute;r&eacute;e.</p></body></html>"
    		  ;
    			//<a href="mailto:?to=adresse1@serveur.com%2C%20adresse2@serveur.com &cc=adresseCopie@serveur.com &subject=Sujet%20du%20message"> Test de mailto </a>
     
     
     
    		try {
    				message.setContent(htmlText, "text/html");
    			} catch (MessagingException e1) {
    				// TODO Auto-generated catch block
    				e1.printStackTrace();
    			}
     
     
    			/*try {
    				message.setText(htmlText, "text/html");
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}*/
    			// Envoie le message
    			try {
    				Transport.send(message);
    			} catch (MessagingException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
     
     
    			// try catch au cas ou l'email est faux
     
    			}catch (Exception e) {System.out.println("L'email est peut etre faux"+e.getMessage());}
     
    		}
     
    		public void verifLogin() throws Exception {
     
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("from client as c where c.login like '"+getLogin()+"'");
    			List clientL = query1.list();
    			session.close();
    			if (clientL.size()!=0) {FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("login");
    			facesMessage.setDetail("Login Existant:Choisisez un autre");
    			context.addMessage("form1:Login", facesMessage);throw exception;}
    			}
     
    		public void verifEmail() throws Exception {
     
    			Session session = (Session) HibernateUtil.getSessionFactory().openSession();
    			Query query1 = session.createQuery("from client as c where c.email like '"+getEmail()+"'");
    			List clientL = query1.list();
    			session.close();
    			if (clientL.size()!=0) {FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("Email");
    			facesMessage.setDetail("Email Existant:Choisisez un autre");
    			context.addMessage("form1:Email", facesMessage);throw exception;}
    			}
     
     
    		public void  message() {
    			FacesMessage facesMessage = new FacesMessage();
    			FacesContext context = FacesContext.getCurrentInstance();
    			facesMessage.setSeverity(FacesMessage.SEVERITY_INFO);
    			facesMessage.setSummary("Email");
    			facesMessage.setDetail("faux Email");
    			context.addMessage("form1:Email", facesMessage);}
     
     
     
    		public java.lang.String getAdresse() {
    		return Adresse;
    	}
     
     
     
    		public void setAdresse(java.lang.String Adresse) {
    		this.Adresse = Adresse;
    	}
     
     
     
    		public java.lang.String getCp() {
    		return Cp;
    	}
     
     
     
    		public void setCp(java.lang.String Cp) {
    		this.Cp = Cp;
    	}
     
     
     
    		public java.lang.String getEmail() {
    		return Email;
    	}
     
     
     
    		public void setEmail(java.lang.String Email) {
    		this.Email = Email;
    	}
     
     
     
    		public java.lang.Integer getIdclient() {
    		return Idclient;
    	}
     
     
     
    		public void setIdclient(java.lang.Integer Idclient) {
    		this.Idclient = Idclient;
    	}
     
     
     
    		public java.lang.String getLogin() {
    		return Login;
    	}
     
     
     
    		public void setLogin(java.lang.String Login) {
    		this.Login = Login;
    	}
     
     
     
    		public java.lang.String getNom() {
    		return Nom;
    	}
     
     
     
    		public void setNom(java.lang.String Nom) {
    		this.Nom = Nom;
    	}
     
     
     
    		public java.lang.String getPassword() {
    		return Password;
    	}
     
     
     
    		public void setPassword(java.lang.String Password) {
    		this.Password = Password;
    	}
     
     
     
    		public java.lang.String getPasswordconfirme() {
    		return Passwordconfirme;
    	}
     
     
     
    		public void setPasswordconfirme(java.lang.String Passwordconfirme) {
    		this.Passwordconfirme = Passwordconfirme;
    	}
     
     
     
    		public java.lang.String getPay() {
    		return Pay;
    	}
     
     
     
    		public void setPay(java.lang.String Pay) {
    		this.Pay = Pay;
    	}
     
     
     
    		public java.lang.String getPrenom() {
    		return Prenom;
    	}
     
     
     
    		public void setPrenom(java.lang.String Prenom) {
    		this.Prenom = Prenom;
    	}
     
     
     
    		public java.util.Calendar getCalendar() {
    		return calendar;
    	}
     
     
     
    		public void setCalendar(java.util.Calendar calendar) {
    		this.calendar = calendar;
    	}
     
     
     
    		public java.util.Date getDateinscription() {
    		return dateinscription;
    	}
     
     
     
    		public void setDateinscription(java.util.Date dateinscription) {
    		this.dateinscription = dateinscription;
    	}
     
     
     
    		public java.lang.Exception getException() {
    		return exception;
    	}
     
     
     
    		public void setException(java.lang.Exception exception) {
    		this.exception = exception;
    	}
     
     
    }
    voici le faces-config
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xi="http://www.w3.org/2001/XInclude"
     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">
     <managed-bean>
      <managed-bean-name>enregistrement</managed-bean-name>
      <managed-bean-class>EnregistrementCandidat</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
     <navigation-rule>
      <from-view-id>/inscription.jsp</from-view-id>
      <navigation-case>
       <from-action>#{EnregistrementCandidat.enregistrer}</from-action>
       <from-outcome>index</from-outcome>
       <to-view-id>/reusite.jsp</to-view-id>
      </navigation-case>
     </navigation-rule>
    </faces-config>
    voici la page 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
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
     
    <html>
    	<head>
    		<title></title>
    	</head>
    	<body>
    		<f:view>
    			<h:form>
    				Login: <h:inputText value="#{enregistrement.login}"/><br>
    				Nom: <h:inputText value="#{enregistrement.Nom}"/><br>
    				Prenom: <h:inputText value="#{enregistrement.Prenom}"/><br>
    				Adresse: <h:inputText value="#{enregistrement.Adresse}"/><br>
    				Code Postal: <h:inputText value="#{enregistrement.Cp}"/><br>
    				Pay: <h:inputText value="#{enregistrement.Pay}"/><br>
    				Email: <h:inputText value="#{enregistrement.Email}"/><br>				
    				Password: <h:inputSecret value="#{enregistrement.Password}"/><br>
    				Password a nouveau: <h:inputSecret value="#{enregistrement.Passwordconfirme}"/><br>
    				<h:commandButton action="#{EnregistrementCandidat.enregistrer}" value="Enregistrer"/>
     
     
     
     
     
     
     
    			</h:form>
    		</f:view>
    	</body>	
    </html>
    voici le log d'erreures
    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
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    Etat HTTP 500 - 
     
    --------------------------------------------------------------------------------
     
    type Rapport d'exception
     
    message 
     
    description Le serveur a rencontr� une erreur interne () qui l'a emp�ch� de satisfaire la requ�te.
     
    exception 
     
    org.apache.jasper.JasperException: javax.servlet.ServletException: /inscription.jsp(12,9) '#{enregistrement.Nom}' Property 'Nom' not found on type EnregistrementCandidat
    	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
     
    cause m�re 
     
    javax.servlet.ServletException: /inscription.jsp(12,9) '#{enregistrement.Nom}' Property 'Nom' not found on type EnregistrementCandidat
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    	org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
     
    cause m�re 
     
    org.apache.jasper.el.JspPropertyNotFoundException: /inscription.jsp(12,9) '#{enregistrement.Nom}' Property 'Nom' not found on type EnregistrementCandidat
    	org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:104)
    	javax.faces.component.UIOutput.getValue(UIOutput.java:184)
    	com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
    	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
    	com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
    	javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
    	javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    	javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
    	javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
    	javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
    	javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    	com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    	com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
    	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    	org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    	org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    	org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     
     
    note La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de JBoss Web/2.1.2.GA.
     
     
    --------------------------------------------------------------------------------
     
    JBoss Web

  5. #5
    Expert éminent
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par défaut
    la propriété est "nom", pas "Nom", Nom étant invalide comme nom de propriété (cf les spécifications java bean quelque part au fin fond des docs de sun )

    Donc, utiliser,
    idem pour les autres propriétés

  6. #6
    Membre éclairé Avatar de argonath
    Homme Profil pro
    Ingénieur d'Etudes
    Inscrit en
    Juillet 2009
    Messages
    248
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur d'Etudes
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2009
    Messages : 248
    Par défaut
    -absence de getters ( peut être pas problématique à ce stade mais après )

    -propriétés de la classe non instanciées dans le constructeur vide par contre, c'est certainement là le problème car au moment où l'appli à besoin du bean ce constructeur est appelé.
    Rajoute un "Machin truc = new Machin()" pour chacun.

    ton faces-config.xml est comment sinon ?

  7. #7
    Rédacteur

    Profil pro
    Inscrit en
    Juin 2003
    Messages
    4 184
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 4 184
    Par défaut
    Encore un double post, Je te rappelle qu'il est interdit de créer plusieurs discussions pour le même problème.
    Il y'a eu au moins 3 discussions, la prochaine fois

Discussions similaires

  1. Probleme avec JSF
    Par Narouto dans le forum Langages de programmation
    Réponses: 1
    Dernier message: 18/07/2012, 00h02
  2. probleme avec jsf
    Par zaghdoud dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 28/05/2010, 16h44
  3. probleme avec jsf et le framework Exadel Fiji
    Par riadhhwajdii dans le forum JSF
    Réponses: 5
    Dernier message: 10/02/2010, 12h07
  4. Probleme avec JSF et selectOneMenu
    Par aniss77 dans le forum JSF
    Réponses: 25
    Dernier message: 01/12/2009, 13h48
  5. Probleme avec le serveur jboss
    Par quini dans le forum Wildfly/JBoss
    Réponses: 0
    Dernier message: 19/02/2009, 11h32

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo