RE: When we write JavaScript Code in the JSP Page from...
actually we need validation first of all. if we done serverside validation it sholudbe checked at serverside.but it will increase the network traffic.so that's why we need java script which is used to validate the given data at clientside before submitting to server.