Guys i have developed a web application in jsp . I have many javscript validation for text validation in the jsp page.while during the testing , i enabled firebug in firefox and cleared a function that validates and submits to a servlet.The web application allows to submit garbage value of the textfiedl . how to overcome this ? any solutions?
+3
A:
You can never trust the client. You must validate all input on the server side. For example, in the servlet.
Use client side validation only as a convenience for the user, in addition to the validation on the server side.
Christoffer Hammarström
2010-04-16 09:37:49
@Christoffer thanks
Suresh S
2010-04-16 09:38:20
@Suresh: np, if you think an answer is the best one you should mark it accepted.
Christoffer Hammarström
2010-04-16 09:44:32
A:
You always need the validate the data in the client side AND in the server site... Only client-side validation is not secure. :)
TiuTalk
2010-04-16 09:38:36
+2
A:
You should always validate on the server and not rely on client side validation. Client side validation is only a nice to have feature that makes it easier to give immediate feedback to the user and save unneccessary roundtrips from the client to the server and back.
codescape
2010-04-16 09:54:41