When I put the dynamic attribute in the form-bean tag it worked.
Thanks Chuck!
This is the configuration that I'm using:
--- in struts-config.xml ---
<form-bean name="loginForm" dynamic="true"
type="org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>
...
<action path="/Login"
type="com.visionnaire.wireless.web.action.LoginAction"
name="loginForm"
scope="request"/>
...
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathname" value="/WEB-INF/validator-rules.xml"/>
<set-property property="pathname" value="/WEB-INF/validator.xml"/>
</plug-in>
--- in validator.xml ---
<form-validation>
<form name="/Login">
<field property="username" depends="required">
<arg0 key="loginForm.username.displayname"/>
</field>
<field property="password" depends="required">
<arg0 key="loginForm.password.displayname"/>
</field>
</form>
</form-validation>
Hope this help,
Fernando
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 28, 2002 12:43 PM
> Subject: Re: Struts Validator
>
>
> There's an entry in the dev mailing list (see link below) that talks about
> the NPE for the DynaValidatorForm.
>
> http://www.mail-archive.com/[email protected]/msg06269.html
>
> I don't know if this has been fixed, but I'm also getting the same problem
even with the latest nightly build
>
>
>
>
>
> Chuck Cavaness <[EMAIL PROTECTED]> on 05/27/2002 10:58:49 AM
>
> Please respond to "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> cc:
> Subject: Re: Struts Validator
>
>
> This may be of no help, but I didn't see that you had the dynamic
attribute
> to "true" like this:
>
> <form-bean
> dynamic="true"
> name="loginForm"
> type="org.apache.struts.action.DynaActionForm">
>
> Chuck
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>