Bonjour à tous,

nous essayons (en vain) de mettre en place le Validator de struts dans une
de nos JSP, mais nous obtenons toujours la même erreur de JBOSS...

AU SECOURS !!!

Merci par avance de votre (précieuse) aide !!!




Voici l'erreur générée par JBOSS :
----------------------------------

13:59:37,823 ERROR [InsertTag] ServletException in '/pages/contrat/visualisation
/rechercheContrat.jsp': ValidatorResources not found in application scope under
key "org.apache.commons.validator.VALIDATOR_RESOURCES"
javax.servlet.ServletException: ValidatorResources not found in application scope
under key "org.apache.commons.validator.VALIDATOR_RESOURCES"

Contenu de rechercheContrat.jsp :
---------------------------------

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>

<html:html>
<center><h2><bean:message key="titre.choix.contrat"/></h2>
<br><hr>
<html:form action="/contratVisualisationChoixContratValideAction.do" method="post"
onsubmit="return validateRechercheContratForm(this);">
<table align="center">
<tr>
<td><bean:message key="libelle.annee"/> / <bean:message key="libelle.numero"/> <bean:message key="factorisation.du.contrat"/></td>
<td><font color="red"><html:errors property="ancontrat" /></font><html:text property="ancontrat" size="6" maxlength="16"/> /
<font color="red"><html:errors property="numcontrat" /></font><html:text property="numcontrat" size="6" maxlength="16" />
</td>
</tr>
<tr><td colspan="2" align="center"><input type="submit" property="submit" value="<bean:message key="bouton.valider"/>"/></td></tr>
</table>

<html:javascript formName="rechercheContratForm"/>

</html:form>
</center>
</html:html>


Contenu du struts-config.xml :
------------------------------

<form-bean name="rechercheContratForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="ancontrat" type="java.lang.String" />
<form-property name="numcontrat" type="java.lang.Integer" />
</form-bean>

<action path="/contratVisualisationChoixContratValideAction"
type="com.sica.sachem.application.contrat.visualisation.ChoixContratValideAction"
name="rechercheContratForm"
scope="request"
validate="false"
input=".contrat.visualisation"> <!-- appel à tiles-definitions.xml -->
<forward name="failed" path=".contrat.visualisation" />
<forward name="autres" path=".contrat.visualisation" />
<forward name="horsProgramme" path=".contrat.visualisation.entete" />
</action>

<!-- Validator plugin -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>



Contenu du validation.xml :
---------------------------

<form-validation>
<formset>
<form name="rechercheContratForm">
<field property="ancontrat" depends="required">
<arg0 key="error.ancontrat.required"/>
</field>
<field property="numcontrat" depends="required">
<arg0 key="error.numcontrat.required"/>
</field>
</form>
</formset>
</form-validation>


Contenu du ApplicationResources.properties :
--------------------------------------------

error.ancontrat.required=Saisie de l'ann&eacute;e du contrat obligatoire !<br>
error.numcontrat.required=Saisie du num&eacute;ro du contrat obligatoire !<br>
(+ les erreurs définies dans le validator-rules)