O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Field Validation

This code is still lacking a bit. First, if the customer enters a duplicate e-mail address, the page does not provide any helpful feedback to let him know that it occurred. Second, because you're not validating the fields, someone could put total garbage into them and still create a new customer. Form-field validation is one of the major components of Web site design. You need to thoroughly understand what values are allowed in certain fields and how fields could be interdependent—in other words, Field 1 might be required only if Field 2 is filled in.

Validating fields is generally straight-forward. Returning error messages from validation is more complex and requires some decisions to be made. Basically, error conditions can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required