I am curious for those of you who use home grown mini web frameworks instead of Struts, JSF, WW, etc, how do you handle your server side validation? Did you write your own solution for this? Are you just doing lots of If/else, switch/case in your code and then forwarding back to the JSP with error variables in the request?
My mini-framework handles validation on two-levels:
1) The data marshalling mechanism (similar to a struts form) can perform straight data validation as appropriate (blank values, range checks and so on).
2) The execution modules can perform more context-sensitive checks.
In either case, failures cause a contruct to be returned to the view with enough information to report the errors (on a field-by-field basis if appropriate), and even highlight the form fields that were in error.
That's not the end of course. I also always perform business-layer validation on anything coming in from the controller layer. [ March 21, 2005: Message edited by: Bear Bibeault ]