This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes ValidatorActionForm and locale error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ValidatorActionForm and locale error" Watch "ValidatorActionForm and locale error" New topic

ValidatorActionForm and locale error

Alex Belt
Ranch Hand

Joined: Jul 12, 2001
Posts: 57
I have a struts aplication that uses the 1.1 validation model. The form classes extend ValidatorActionForm but used to extend ValidationForm, so the validation.xml file contains form names rather than action paths. After changing to extend ValidatorActionForm, as soon as I change the validation.xml file to validate on an action path, it comes back with this error:

No form found under 'bean name' in locale 'locale value'

This application is going to be used in several configurations, so we're using locale to distinguish which configuration the user is using. As soon as I change the validation.xml to refer to the bean name rather than the action path, no more problem. Has anyone else encountered this problem? I am fairly new to struts, and a fairly quick scan of google results has failed to turn up this issue.

Alex Belt
Ranch Hand

Joined: Jul 12, 2001
Posts: 57
I found it. I didn't realize I had to define multiple formsets, one for each locale the application runs under. I don't need to use the ValidatorActionForm after all, I can just extend ValidatorForm and define multiple form sets with the appropriate validation rules.

Consider Paul's rocket mass heater.
subject: ValidatorActionForm and locale error
Similar Threads
ValidatorActionForm Question?
Validation framework is not working
about validator.xml file
declarative validation of wizard pages
Validating some extra fields of action form not in my jsp?