Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation of fields in JSP

 
Dinesh Pise
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I have question normally what we do for validation of any fields in JSP we use JavaScript (Client Side) and also we do validation at server side.
It is know that some one can bypass client side validation so it is mandatory to do server side validation also but what if we call JavaScript on submit button and from there we submit action then also server side validation is required.

What am I thinking even if he disable JavaScript the user cannot submit the form. Is there any way even after that he can bypass validation.

Thanks..!!
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dinesh Pise wrote:
What am I thinking even if he disable JavaScript the user cannot submit the form. Is there any way even after that he can bypass validation.


if the submit bounded to JS. and there is no JS enable on browser then, the form submission will take place- in case you use input type=submit.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bottom line is to simply make sure that server-side validation always takes place. Always.
 
Dinesh Pise
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:The bottom line is to simply make sure that server-side validation always takes place. Always.


I agree there should server side validation, but is there any way that user can submit the form

if the submit bounded to JS. and there is no JS enable on browser then, the form submission will take place- in case you use input type=submit.


My input type is button and not submit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic