aspose file tools*
The moose likes JSP and the fly likes Validation of fields in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Validation of fields in JSP" Watch "Validation of fields in JSP" New topic
Author

Validation of fields in JSP

Dinesh Pise
Greenhorn

Joined: Jul 18, 2012
Posts: 27
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jan 10, 2002
Posts: 60072
    
  65

The bottom line is to simply make sure that server-side validation always takes place. Always.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dinesh Pise
Greenhorn

Joined: Jul 18, 2012
Posts: 27
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
 
 
subject: Validation of fields in JSP
 
Similar Threads
validation on serverside
Struts 1.2 - Client and Server-side validations
Server Side validation - what kind of work flow have to follow?
Doing server side validation in jsp
difference between struts and jsp