Validating form field entries is using server side logic is something AJAX is well suited to do. This is java.sun.com article Realtime Form Validation Using AJAX shows how to use AJAX with Java servlet technology to do the validation.
Tomorrow will mark one year since the term AJAX was coined by Jesse James Garrett's article Ajax: A New Approach to Web Applications. So much has happened in just one year. Like any 1 year old AJAX growing up fast. Let's take a moment to see how AJAX has grown.
See the AJAX FAQ for the Java Developer.
Introducing AJAX : A description of AJAX in the J2EE world with solutions to real problems.