struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Muller <mmul...@theworld.com>
Subject Re: validation doesn't validate
Date Thu, 03 Jul 2003 17:02:33 GMT

OK, so I switched to the DynaValidatorForm.  Still no joy.  There is 
something I can't explain, though.  I stuck this in my action code:

DynaValidatorForm  f  = (DynaValidatorForm)form;
System.out.println("??????????" + f.getClass().getName());

And it prints out "org.apache.struts.validator.DynaValidatorActionForm".

I double-checked my form-bean in my struts-config, and I definitely have 
  the DynaValidatorForm in there.  I reloaded the app.  It still says 
DynaValidatorActionForm.  I tried stopping tomcat and restarting it.  I 
tried changing the form bean to some bogus class, and it exploded when I 
  loaded that page (as I expected).  I changed the class back to 
DynaValidatorForm, but STILL the action says it's being passes a 
DynaValidatorActionForm.

Thanks,

Mike


David Graham wrote:

> --- Michael Muller <mmuller@theworld.com> wrote:
> 
>>I can't get the validation framework to do anything. 
>>
>>I'm speculating that the validation.xml file isn't being read; I tried 
>>putting a rule that doesn't exist and then some arbitrary syntactically 
>>incorrect text in the file, and I didn't get an error anywhere I could 
>>find.  On the other hand, there is a message like this:
> 
> 
> Currently, commons-validator doesn't validate your xml file against the
> DTD so you won't see a syntax error.
> 
> 
>>INFO: Loading validation rules file from '/WEB-INF/validation.xml'
>>
>>in the console log.  And no errors.  No errors in the localhost_log, 
>>either.  So maybe it *is* reading the validation file.
>>
>>My form bean name matches my validation form name, which matches the 
>>name in my action mapping.  I have validate=true in my action mapping.  
>>I have a validation rule defined for a field on the form.  (Two, 
>>actually: required and integer.)  Nothing. 
>>
>>I'm using a DynaValidatorActionForm, in case that matters.  
> 
> 
> You need to use DynaValidatorForm.
> 
> David
> 
> 
>>Oh, and this
>>
>>is RC1 of 1.1 running in tomcat 4.1.
>>
>>Help!  I'm sure this is a common problem, and I'll be embarassed when I 
>>learn what it is, but I'm stuck.
>>
>>Thanks,
>>
>>  -- Mike
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message