No, no database access in the action form - yech, bleh, ptui! :-)

General principle: Form > Action > Business Layer > DAO > Database.

Errors and messages from the lower layers can be handled via the
Action.saveMessages() method, then exploited via the
<html:messages><bean:write></html:messages> structures in the .jsp.

hth,

On 2/23/06, Scott Van Wart <[EMAIL PROTECTED]> wrote:
> I have a number of scenarios where I need to validate against a set of
> rows in a database table.  For example, when logging in, it's all fine
> and dandy to make sure a username and password is entered in the
> ActionForm.validate method, but should database access go in the
> ActionForm?  If so, how do I return errors/messages back to the calling
> page from within the Action.execute method?
>
> - Scott

--
Keith Sader
[EMAIL PROTECTED]
http://www.saderfamily.org/roller/page/ksader

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to