code: public static String getParameter (HttpServletRequest req, String name, String defval)
      {
          String value = req.getParameter(name);
          return StringUtil.isBlank(value) ? defval : value.trim();
      }
docs: Fetches the supplied parameter from the request. If the parameter does not exist,
  <code>defval</code> is returned.