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

server side validations for each input tag

 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,
I am working on a ERP web based applications, where in i am having
15-20
inputs in my html forms.now these input are such that i need to provide
validations for each of them, until each field is not validated the
user
is restricted to enter the next field.So i need a server side
validation for each of my input.
Now for 15 input i have to call a servlet so many times and suppose if
my application is distributed then for these validations i need to
inovoke the servlets remotely.
Is there any other way out where i can do the same without invoking the
servlets as this is going to hamper the performance and the overall
process time. please help.I could think of a freely available database i.e
MySql/Postgres for validating these inputs, these could act as local
datbase
and after these validations are done then it could be stored in the
central
depository.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rishi
You need to validate each input on the form before they can move to the next input field?? And you want to do it server side? It seems to me that using javascript would be better suited for that as you can do it all client side and not have to keep making round trips to the server - it'd be incredibly slow for a user to go through that, especially if the server was busy or the user had a slow connecttion.
I am new to servlets and jsp so I may not fully understand what your doing and the need for server side validation but it seems like quite a bit of extra overhead to make 15 trips to the server to fill out one form.
Dave
 
Joe Pardi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the form tags in a tag library called dotJ. Their tags do exactly what you need.
Client-side field validation is done with pre-canned JavaScript and DHTML. Server-side validation is done via the tag handlers. For down-level browsers, the client-side valdation gets automatically disabled.
Check it out, their web site is at http://www.dotjonline.com.
The form example page is at http://www.dotjonline.com/taglib/form.jsp
- joe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic