struts provide both client side and server side validation. which is better . what is the need of struts client side validation .
The term "client-side validation" refers to JavaScript code automatically generated by Struts and placed in your JSP to validate data before a submit occurrs. If validation is turned on, Struts always does server-side validation whether you do client-side validatoin or not. In order to use the Struts Validation Framework's client-side validation, you will still have to modify each JSP to plug into the generated validation scripts.
The advantages of client-side validation are that it's faster and that it saves sending a request to the server that is doomed to be rejected anyway.
The disadvantage of client-side validation is that its not 100% reliable due to the fact that users can turn off JavaScript in their browsers. If they do this, none of the JavaScript code runs at all. That's why Struts always does server-side validation just in case.