struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.V." <jvsr...@gmail.com>
Subject Webapp - Struts 1.3 maintenance
Date Thu, 21 Mar 2013 20:10:58 GMT
I inherited an internal web app today that has not been updated since 
probably 2005 (not sure).

I have a few questions:

  * There are about 100 Forms, The action classes extend Action and the
    forms extend ActionForm
  * I want to use Apache commons validator and move the form validations
    from the validate() method that is in each Form (that extends
    ActionForm).
  * With this structure, which class would extend: DynaActionValidatorForm ?


I have these properly setup

My struts-config.xml has the validator plugin properly configured and I 
have in place validator-rules.xml and validator-user.xml in WEB-INF when 
deployed.  I have an entry in validator-user.xml that has the same name 
of the bean that is in struts-config.xml.

I extended the Form class with "extends DynaActionValidatorForm" but the 
validate method is still called and my declarative validations are never 
run.

For lack of a better example on this  ( Where the Action uses the Form 
and the Form class validate() method is called automatically by the 
framework), how do I make this work?

If there is a working example anywhere, please let me know or post 
here.  I have done everything as instructed by the documentation but the 
declarative validations are not being picked up.

thanks


J.V.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message