struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <ekb...@swbell.net>
Subject Re: [Newbie] Another silly question
Date Fri, 30 Aug 2002 16:52:13 GMT
The action form should only be enforcing semantic constraints:
    * The data is well-formed
    * The data is a number/whatever
    *  Is the format of the data congruent with what I expect (ie 
mm/dd/yyyy for a date, etc)

The action should be responsible for actually calling business logic:
    *  Is this a real user?
    *  Is their account still valid?

Mark Kaye wrote:

>Can I use ActionErrors in my actions?  Rather than in my ActionForms?  I
>have tried but it causes an error.  I want to be able to do some server
>side validation beyond what I do in the ActionForm.  It would make sense
>to have this in the action - I think.  Or am I wrong?  Basically I am
>authenticating a user and currently the ActionForm does validation on
>the userid and password but only that.  Should I also be validating the
>user in the database here (I have a business object that does the actual
>user validation and use a value bean to pass info between)?  Or should I
>do that in the Action itself?
>
>Suggestions appreciated.
>
>--
>To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message