text: how can we  built date validation servlet? i need help in jsp and servlet .i have  one jsp page in that page i have problem in servlet and jsp page . i have one jsp page in the that page i have "date ,ph,metrerial etc r fields ... so, when i enter  any date then its releted record will be fill up . date: 11/2/2003    fe:12 ph:23 meterial:25  like that ... but i have problem that when i enter 11/2/2003 date then it display all records which r in db. when i enter another date then its releted records will be filled  so, pls what should i do? on your servlet, you can use something similar to validate the date passed:  protected void dopost(httpservletrequest request, httpservletresponse response) {  string date = request.getparameter("date");  if (date == null) || date.equals("")) {      throw servletexception("no date parameter specified"); }  try {      simpledateformat dateformat = new simpledateformat("dd/mm/yyyy");      dateformat.parse(date); } catch (parseexception e) {      throw new illegalargumentexception("cannot parse date: " + date); }       // rest of your servlet code }   in addition, use client-side scripting (e.g. javascript) on your jsp pages to do validation before form submission.