Hello, I know client side validation using JSP is not good. but my client side req. is like this. can u any one tell me how to effectively use JSP for client side validation. pls provide me some sample code or urls. With Regards, Anjali
The only way to to client-side validation is to have code in the browser. This means it will have to be JavaScript not JSP. There are obviously issues about portability between browsers and users disabling JavaScript etc. A lot will depend upon the intended audience of the application (e.g. is it Internet or Intranet based) and how much control that you have over the version and settings of their browsers. You will probably need to provide validation in 2 places: 1) Initial validation client-side using JavaScript to enusre that they have filled in all mandatory fields, that numbers are valid etc. 2) Server-side. Repeat the validation in part 1 to cater for the fact that some users may have disabled JavaScript and add additional validation that can access the database to perform consistency checks. Hope this helps