Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Validation of fields in JSP

 
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..!!
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • 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.
 
Marshal
Posts: 67275
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!