Originally Posted by BubikolRamios
will give you a short example how to do it:
say you have this div on top of everything that you already have, providing that action on your <form redirects to that same form:
/*will pick up your street*/
String street = request.getParameter("street");
out.print("error: street must be entered, data not submited !");
//do saving to database here
The author has asked for the validation made in a servlet. Your code looks more like a scriplet (because the validation is done inside of the jsp), doesn't it?