You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bas Passon <b....@first8.nl> on 2002/10/16 11:51:06 UTC

ValidatorPlugin not initializing

Hello,

I'm using struts 1.1b2 with tomcat 4.1.12 and trying to use the validator
in combination with dynaforms. I noticed the initialization step of the
validator plugin does not show any rules being read in the logs and no
formsets are read either. It does however say:

Oct 16, 2002 10:50:36 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Oct 16, 2002 10:50:36 AM org.apache.struts.validator.ValidatorPlugIn
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'

But that is all that is written in the logs.

When I deploy the struts-validator.war example webapp these rules and
formsets are listed. The logs then have statements like:

Oct 16, 2002 10:14:56 AM org.apache.commons.validator.ValidatorResources
put
INFO: Adding FormSet 'FormSet: language=null  country=null  variant=null

which I would expect for my own set of forms as wel.

I suppose I have a bug in my configuration, but I can't find it. Can
anyone tell me what I am doing wrong? I listed sections from my
configuration below.

thnx,

Bas

+++++ struts-config.xml ++++++

*** snip ***

<form-beans>
  <!-- ++++++++ DEFINITION OF LOGINFORM +++++++ -->
  <form-bean
       name="loginForm"
       dynamic="true"
       type="org.apache.struts.validator.DynaValidatorForm"
  >
  	<form-property name="username" type="java.lang.String"/>
        <form-property name="password" type="java.lang.String"/>
  </form-bean>
</form-beans>

<action-mappings>
  <action
     path="/login"
     type="ac.linc.pdp.actions.LoginAction"
     name="loginForm"
     scope="request"
     validate="true"
     input="/login.jsp"
  >
     	<forward name="success" path="/main.jsp"/>
  </action>

</action-mappings>

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
   <set-property property="pathnames"
                 value="/WEB-INF/validator-rules.xml,
                        /WEB-INF/validation.xml"/>
</plug-in>

***** snip *****

+++++ struts-config.xml ++++++

+++++ validation.xml +++++

<form-validation>
   <formset>
      <form name="loginForm">
         <field property="username" depends="required">
            <arg0   key="label.username"/>
         </field>
         <field property="password" depends="required">
            <arg0   key="label.password"/>
         </field>
      </form>
   </formset>
</form-validation>

+++++ validation.xml +++++

-----------------------
Bas Passon
First8 - http://www.first8.nl
Email: b.passon@first8.nl
Phone: +31 (0)24 348 38 77
Fax:   +31 (0)24 348 35 71


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>