If you just put validate in the view it should not solve the problem. If you have a select with options listed from the server, you can hack it adding values using some free tools. In this case the user can put wrong values if the business tiers isn't validating the data. I've used AJAX to validate some simple features like if the value is a string, number, the length, etc. After the submit, the data is filtered by the business tier where the simple features are validated again + the business rules. I this case I'm using Hibernate Validator. After the business validation, the object is submited to the Data Access Tier where it is ready to be persisted. Pretend you are registering a customer; the class model should be:
customer.jsp > customer_validator.js > CustomerAction > CustomerBO > CustomerDAO > Repository
bye.
[ December 01, 2008: Message edited by: Danilo Dadonas ]
[ December 02, 2008: Message edited by: Danilo Dadonas ]