>
>
> >
> > Well, if I remove my validation code in the validate() method and put it
> > into execute() method, then I can easily control which logical name to be
> > return, but I thought that is not a good way to do that right?
> >
>
> While this might not be a "good way to do that," it's what I would do and
> in
> fact have done.
> --
> Jim Kiley
> Senior Technical Consultant | Summa
> [p] 412.258.3346
> http://www.summa-tech.com
>

I occasionally have to do validation in the execute() method but always
prefer to do declarative validation with annotations wherever possible since
it is so much simpler and cleaner. This means all my actions have to be able
to handle an 'input' result. Since 'input' result is the standard for
validation errors you should be prepared for it as the next programmer who
works on your code may add a validation() method or add validation
annotations.

@OP: If you know which page# in a wizard sequence to return to and use that
page# in the jsp name then you can make that page# available with a
getPage() method and do this:

    <result name="input">/xxx/MyWizardPage${page}.jsp</result>

It does mean you would need to have a jsp page naming convention that
includes the page#.

Reply via email to