code: public static Date getDateParameter (
          HttpServletRequest req, String name, String invalidDataMessage)
          throws DataValidationException
      {
          String value = getParameter(req, name, false);
          if (StringUtil.isBlank(value) ||
              DATE_TEMPLATE.equalsIgnoreCase(value)) {
              return null;
          }
          return parseDateParameter(value, invalidDataMessage);
      }
docs: Fetches the supplied parameter from the request and converts it to a date. The value of the
  parameter should be a date formatted like so: 2001-12-25. If the parameter does not exist,
  null is returned. If the parameter is not a well-formed date, a data validation exception is
  thrown with the supplied message.