I'm having a challenge getting the Validator plug-in to work.   It's my first crack at 
it, so forgive if I'm missing something obvious.  Better yet, if I am missing 
something obvious, tell me what it is.

When I call up my action, I'm getting a "Resources not defined for Validator" 
exception.  My logs say:

87406 DEBUG [HttpProcessor[8080][2]] org.apache.struts.action.RequestProcessor     -  
Validating input form properties
121976 ERROR [HttpProcessor[8080][2]] org.apache.struts.validator.ValidatorForm     - 
Resources not defined for Validator
org.apache.commons.validator.ValidatorException: Resources not defined for Validator
 at org.apache.commons.validator.Validator.validate(Validator.java:574)
 at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:152)

My web.xml contains this:

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    ...
    <init-param>
      <param-name>application</param-name>
      <param-value>ApplicationResources</param-value>
    </init-param>
    ...
  </servlet>

I have a properties file at the base of my src tree named 
ApplicationResources.properties and it contains :

profile.user.title=Title

A check of the .war file shows that this is in war file that's produced.


My validation.xml file is configured to validate just one field (hey, I'm just getting 
going!):

        <formset>
                <form name="userProfileActionForm">
                        <field property="title" depends="required">
                                <arg0 key="profile.user.title" resource="false" />
                        </field>
                </form>
        </formset>


What am I missing?  

Any help would be appreciated.   This looks like a good plug-in to use.  

Dave


Reply via email to