• Post Reply Bookmark Topic Watch Topic
  • New Topic

Validation

 
shriram iyer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a form to capture user data.If user enters "null" in all the fields and submits the page,how to validate it using jsp.

Cheers,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A user cannot enter null. I assume you mean leave it blank?

In any case, are you asking about client-side validation? If so, you'd use JavaScript.

If server-side, use Java in the servlet (not JSP) to which you submit the form. You should always validate on the server even if you perform client-side validation.
 
Jerome Gao
Greenhorn
Posts: 13
Java MyEclipse IDE MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to verify in the client,
example:

Of course, the server is to verify, regardless of in the client is validated!





 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!