For validation that can only be done against the database, should this go in the validate method or in the execute method?

I usually do it in execute() and keep basic validations in the Validator framework.



For example checking that a customer doesn't alerady exist before inserting it, or checking that a user has entered a valid address before the execute method is called to try and create it.


Also, with the validator framework, does this just apply to basic (non model based) validation?

You could write custom vaildators that do model based work. The validations that come with Struts perform some basic checks on the data before it reaches your model and allow for easy error display.


David


_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess



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


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



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



Reply via email to