This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes server side validations for each input tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "server side validations for each input tag" Watch "server side validations for each input tag" New topic

server side validations for each input tag

Rishi Singh
Ranch Hand

Joined: Dec 09, 2000
Posts: 321
Dear Sir,
I am working on a ERP web based applications, where in i am having
inputs in my html these input are such that i need to provide
validations for each of them, until each field is not validated the
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
and after these validations are done then it could be stored in the
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
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.

Joe Pardi
Ranch Hand

Joined: Oct 03, 2001
Posts: 47
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
The form example page is at
- joe
jQuery in Action, 3rd edition
subject: server side validations for each input tag
It's not a secret anymore!