struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Actions & Validation
Date Mon, 05 Mar 2007 22:01:28 GMT
--- Scott <> wrote:
> I keep reading about how Actions can be POJOs with
> execute method, yet I don't see any examples of

That's because most Actions need to do more than just
be a POJO; they need to be validated, have access to
the session, etc.

> I need to know if the validation failed so I can 
> return the appropriate String

If validation fails (and you're implementing
Validateable and/or ValidationAware or subclassing
ActionSupport or etc.) it returns to the input page,
which is what you'd normally want to do.

You can still implement Validateable.validate and
ValidationAware.hasErrors by hand and return whatever
you want.


The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.

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

View raw message