Posted By:
Dermot_Hennessy
Posted On:
Monday, June 9, 2003 03:44 AM
I don't think that the answer is as cut-and-dried as that. I have found that for speed it is not always a bad idea to let Javascript handle some form validation, such as, for example, determining whether a field has had legal characters entered into it. The thing about using Struts is that you are making a request back to the server every time you call a Struts tag. Sometimes that's just too expensive.
I recommend though, that if you're using Javascript for validation, you store it in a separate .js file and access it from your JSP, as opposed to inserting it in each JSP definition. This makes for clarity and a single point of update.
Dermot