So you noticed the same problem.
Joe, does this work for you?
Your post at
http://www.mail-archive.com/dev%40struts.apache.org/msg12064.html
seems to imply this. What do you do differently?
Or should Struts 1.3 go back to validator 1.1.4 rather than depend on
1.2 DEV?
Wolfgang
Niall Pemberton wrote:
I hadn't realized this was a recent change :-(
http://www.mail-archive.com/dev%40struts.apache.org/msg12033.html
...but you prompted me to compare Validator 1.1.4 with the current version,
and this is caused by this change to ValidatorResources (revision 264683) a
few weeks ago:
http://svn.apache.org/viewcvs.cgi?rev=264683&view=rev
The issue is in Commons Validator (rather than Struts) - probably best if
you open a bugzilla ticket against Commons Validator for this.
Niall
----- Original Message -----
From: "Wolfgang Gehner" <[EMAIL PROTECTED]>
Sent: Monday, October 03, 2005 8:32 AM
While bringing an app to a recent build (0909) of struts 1.3 and
commons-validator-1.2.0, I notice the following related to
ValidatorPlugIn:
When using multiple validation files, as in:
<plug-in clasname="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/lib/validator-rules.xml,/WEB-INF/moduleA/validationA.xml,/WE
B-INF/moduleB/validationB.xml"/>
</plug-in>
I get in the tomcat console:
"WARN Overriding FormSet definition. Duplicate for locale: fr"
Result is that validation rules on moduleA are not working.
I suspect the message is because both validationA.xml and
validationB.xml have a <formset language="fr">
We used to be able to have one validationX.xml per module without
problems. (Having the bundle attribute since struts 1.2x made that even
better, so there could be one resource-file per module).
I see that now commons-validator 1.2 seems to change this. I fear that
without a fix I would have to go back to validations for 400 screens in
one single validationABCDEF...xml.
It looks like commons-validation 1.2 implementation builds a formset key
based on language, country and variant, but doesn't seem to merge
formsets any more.
If my analysis is correct, my suggestion would be
- to either have commons-validator continue to merge formsets for
backward compatibility, and/or,
- add a namespace or id parameter as in <formset id="moduleA"
language="fr">, if necessary to keep the "physical map" feature.
Using existing variant as namespace as in language="fr" country="ch"
variant="moduleA" would be an ugly hack, because I would have to specify
the locale as this for every jsp so that validation would still work.
Kind regards,
Wolfgang Gehner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]