I have a struts 1.2.9 app that has several modules (assume they are
named "a" and "b").  In my struts-config-a.xml file, I have a form
defined as followed:

 

    <form-bean name="formRegister"
type="a.modules.register.RegisterForm" />

 

My validation.xml file looks like:

 

<form-validation>

      <formset>

            <form name="formRegister" >

                  <field property="registerName" depends="required">

                  </field>

            </form>

      </formset>

</form-validation>

 

When I try to access the form, I get:

 

java.lang.IllegalArgumentException: Resources cannot be null.

      at
org.apache.commons.validator.Validator.<init>(Validator.java:188)

      at
org.apache.struts.validator.Resources.initValidator(Resources.java:475)

      at
org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:10
4)

      ...

Based on some other posts, I think this is telling me it can't find any
validation information for my form ("formRegister")-which I assume means
that the name specified in my <form> tag is not what validator expects
to see for form within a module.  I've tried "a.formRegister" in my
<form> tag and that doesn't seem to work either.

 

I currently have a single validation.xml file.  The plugin is configured
in the main struts-config.xml file.  I assume I can only have one
incarnation of the validator plugin.  Is there something I need to put
in the individual module configuration files?  Do I really need to have
several invocations of the plugin?

 

Can someone give me some hints on configuring validator in a
multi-module struts app?

 

Thanks

 

Scott

 

Reply via email to