Some further details on my question:
I understand that you can have the request go straight to the JSP and
avoid the first time validation.
This is acceptable in some circumstance, but in other circumstances you
may wish to have your action do some work before presenting the page (a
common requirement in more complex applications), and you may wish to
avoid access to any JSP's directly.
How then (with this extra clarification) can you prevent the behaviour
described in the original posting ?
Many thanks for any help
Ghoot
PS Please someone respond ! So i dont get too disillusioned :)
> -----Original Message-----
> From: Emaho, Ghoot
> Sent: 31 July 2001 15:49
> To: [EMAIL PROTECTED]
> Subject: Automatic Form Validation
>
>
> Quick question on Form validation, using the Automatic Validation
> offerred by Struts.
>
> If i have a form bean which performs some validation on the validate
> method, and an action has it's definition of validate set to
> true, then
> the Form Bean's validate method gets called before the
> action's perform
> method. However, this then displays my error messages on the form page
> the first time i go to the page ! Am I missing something ?
>
> Now i can get round this with some checking in the validate method to
> ignore it the first time round - as there will be no data yet. As i
> understand, the bean is created if it isnt found. So if it's just been
> created, and then the validate method is called of course
> there will be
> nothing there ?
>
> Any suggestions ? Or does someone want to point out the obvious ?!
>
> In our Struts implementations to date, we have avoided using this
> feature and done our validation from within the Action. But I am
> investigating this feature and would like to know why this is
> so / what
> i am doing wrong !
>
> Many thanks
>
> G
>