• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to user Server Side validation in JSP pages?

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I have a Registration Form in which I am registering user to perform some sort like Entering messages I want to perform some Server Side validation.

Like suppose a user has Enter an Id then as soon as he start entering the Id then I want that this Id should be checked in database that if this Id exists in database or not.

and similar types of validation I want to apply on other fields to.

How can I acheive this?


Thanks
 
Greenhorn
Posts: 16
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The example you present can be implemented using AJAX. You can check it out at the W3schools site. They have some good training material there with examples.
 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to use jQuery to do your Ajax (and other complicated JavaScript actions). It will save you a lot of headaches, and a lot of code.
 
Bear Bibeault
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And to be a bit pedantic about it: you don't do thins in "JSP pages" -- the JSPs are just templates for the HTML pages that are generated. So you're actually doing this from HTML pages (that just happen to be generated from JSP).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!