Yes, I have:

...
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" 
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  </plug-in>
</struts-config>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, September 17, 2004 9:37 AM
To: Struts Users Mailing List
Subject: Re: "Resources not defined for Validator"






Do you have the plug-in set in the struts-config.xml?





                                                                           
             "Dave Bender"                                                 
             <[EMAIL PROTECTED]>                                             
                                                                        To 
             09/17/2004 10:26          "Struts Users Mailing List"         
             AM                        <[EMAIL PROTECTED]>            
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
               "Struts Users           "Resources not defined for          
               Mailing List"           Validator"                          
             <[EMAIL PROTECTED]                                             
                  he.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




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





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to