struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Reumann <>
Subject Re: Validation Problem
Date Wed, 22 Mar 2006 16:38:52 GMT
There are several things you can do to test. Your blank page has me 
wondering if you are really even getting to where you 'think' you are. 
The first thing you need to figure out is if what you think is happening 
is really happening. Debugging Struts stuff can be a pain I know:)

I haven't seen your whole Action class, but put in some logging 
statements or use a debugger and make sure you are even getting here:

CandidateForm candidateForm = (CandidateForm) form;
            ActionMessages errors = candidateForm.validate();
            if (!errors.isEmpty()) {
                this.saveErrors(request, errors);
                return mapping.getInputForward();

Then also print out the result of !errors.isEmpty. See if it's coming 
back false.

Then a few other things... Change your input page in your action mapping 
to some simple jsp that just has the text "hello"  on it. Skip your 
validation test above, but just try to return from your action with 
return mapping.getInputForward() and see if you get to your "hello" page.

Without access to your app it's difficult to debug. You might not even 
be executing the validation stuff above because of something else going 
on and maybe you are forwarding to your resulting page (and maybe that 
page doesn't exist?).

First step is using a debugger or print out some log statements.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message