code: public static int getIntParameter (
          HttpServletRequest req, String name, int defval, String invalidDataMessage)
          throws DataValidationException
      {
          String value = getParameter(req, name, false);
          if (StringUtil.isBlank(value)) {
              return defval;
          }
          return parseIntParameter(value, invalidDataMessage);
      }
docs: Fetches the supplied parameter from the request and converts it to an integer. If the
  parameter does not exist, <code>defval</code> is returned. If the parameter is not a
  well-formed integer, a data validation exception is thrown with the supplied message.