Dan, In order to preserve a layered approach, there are 2 issues:
1) the display of errors 2) evaluating if an error has occurred In my Struts applications, I have a Business Logic Layer (BLL) that will always perform 2). In the Action class, I call the validation function to check for HTML form errors as well as calling the BLL to check of business rule errors (such as the duplicate emails). If an error is found, my action class will put ensure the error appears on the page which generated the error. The displaying of errors usually occurs through the application platform, so in this case, ensure that the error message and error handling is done by Struts. Using this approach, you can re-use your BLL for other applications without having Struts tie-ins. Aaron -----Original Message----- From: Dan Allen [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 1:48 PM To: Struts-User List Subject: validate business data Naturally all screening of data should be done by the ActionForm/Validator interface, but when it comes time to looking for duplicate usernames/emails or other such business conflicts, this must be done in the business logic layer. How do most of you handle this? Do you create a validateData() method in your Action class or is this something that the Model objects should be able to handle? Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, <[EMAIL PROTECTED]> http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Windows: where do you want your data to disappear to today? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]