Hey all,

First time posting to the list.

Been slowly learning Struts 1.1 over the past few weeks.

Trying to get the Validator working, to absolutely no avail.  I don't get
any Java Errors, and neither do I get any Validator errors.

I have <html:errors/> In my jsp page.

I am using an ActionForm that extends ValidatorActionForm.  I have tried
this class both without a validate(...) method, and with a validate(..)
method that called a super.validate.

I have debugged it out, and the validate(..) method on the
ValidatorActionForm returns null.  However, I have set both fields to be
required.

I'm totally stumped.

I'm hoping someone can see where I am going wrong.

(I've strippe out the XML and DTD declarations for the sake of brevity)

struts-config.xml
--
<struts-config>
  <form-beans>
    <form-bean name="security.login"
type="com.GSA.ActionForm.Security.Login" />
  </form-beans>
  <action-mappings>
    <action forward="tiles.page.login" path="/" />
    <action input="tiles.page.login" name="security.login"
path="/security/login" scope="request" type="com.GSA.Action.Security.Login">
      <forward name="Failure" path="tiles.page.login" />
    </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>
  <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
  </plug-in>
</struts-config>
--

validation.xml
--
<form-validation>
  <formset>
        <form name="login">
       <field property="name" depends="required">
        <arg0 name="required" key="security.login.name"/>
       </field>
       <field property="password" depends="required">
        <arg0 name="required" key="security.login.password"/>
       </field>
    </form>
  </formset>
</form-validation>


--
Mark Mandel 
Web Application Developer 
Hitachi Data Systems Corporation 

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

Reply via email to