tags:

views:

56

answers:

3

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
@Christoffer thanks
Suresh S
@Suresh: np, if you think an answer is the best one you should mark it accepted.
Christoffer Hammarström
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
+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