If the debug is greater than zero when you are
initializing the ValidatorServlet, you should see the
the form values being printed to standard out. Can
you see anything? This is a good check as to whether
the resource is loading. Do you have the error
messages defined in your messages resources? The
default one for required is 'errors.required'.
David
--- David White <[EMAIL PROTECTED]> wrote:
> I have a small and simple web app that I have
> working with vanilla
> struts. I am trying to incorporate the struts
> validator mechanism by
> converting just one form. To do so, I have done the
> following:
>
> Placed the Struts_Validator-20010702.jar into the
> web app's lib dir.
>
> Place the jakarta-regexp-1.2.jar into the
> web app's lib dir.
>
> Place the struts-validator.tld into the web
> app's WEB-INF dir
> (along with the struts tag lib files).
>
> Copy the example validation.xml file into
> the web app's WEB-INF
> dir. Removed all but one form from the default (no
> locale) formset.
> Edited each field so that it depends on "require"
> only. Removed all the
> localized formsets.
>
> Cut & paste from the validator servlet
> definition from the
> example web.xml into mine. Changed the taglib
> reference for the
> validator taglib (no tld durectory).
>
> Changed the jsp to use the
> validator:errorsExist tag in place of
> the struts errors tag. Added the validator tag lib
> to the page.
>
> Changed the form class so that it extends
> ValidatorForm rather
> than struts ActionForm. Commented out my previously
> coded validate()
> method in the form class.
>
> In the form's action class, remove the check
> for errors in the
> perform() method.
>
> Added validate="true" to the form's action in the
> struts-config.xml
> file.
>
> When I submit the page with empty fields, no errors
> are reported and the
> form's action just marches merrily along forwarding
> to the next jsp
> which fails because parameters are empty. I have
> looked and tried again
> and again with no luck. Before I give up, I thought
> I'd ask for help
> here. Any ideas as to what I am missing?
>
> Thanks In Advance,
>
> David
> Seattle
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/