Bonsoir,
Je suis en train d'essayer d'afficher les erreurs à la validation d'un formulaire, 
voici mon formulaire :
	
	| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 
 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    	<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<html:errors property="nameEmpty" />
<form action="/WebAppBoutique/creerClient.do">
<input type=text name=nom>
<input type=text name=prenom>
<input type=submit>
</form>
</body>
</html> | 
  Et dans eclipse ça me dit qu'il ne connait pas le tag <html:errors />
j'ai mon fichier qui gère l'erreur:
	
	| 12
 3
 4
 5
 6
 7
 8
 9
 10
 
 | public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) {
	 ActionErrors errors = new ActionErrors();
     if (getNom() == null || getNom().length() < 1) {
         errors.add("nameEmpty", new ActionMessage("error.name.required"));
     }
     if (getPrenom() == null || getPrenom().length() < 1) {
         errors.add("passwordEmpty", new ActionMessage("error.password.required"));
     }
     return errors;
} | 
 Ceci dans mon struts-config
	
	<message-resources parameter="ApplicationRessources" />
 Enfin quand je valide mon formulaire, j'obtiens ce message dans la console eclipse:
	
	21:52:08,938 INFO  [ComposableRequestProcessor] Initializing composable request processor for module prefix ''
 Voilà, en gros je ne sais pas ce qu'il faut faire.....
Merci à vous si vous savez comment corriger ceci.....
						
					
Partager