code: public static Set<String> getParameters (HttpServletRequest req, String name)
      {
          Set<String> set = new HashSet<String>();
          String[] values = req.getParameterValues(name);
          if (values != null) {
              for (int ii = 0; ii < values.length; ii++) {
                  if (!StringUtil.isBlank(values[ii])) {
                      set.add(values[ii]);
                  }
              }
          }
          return set;
      }
docs: Fetches all the values from the request with the specified name and converts them to a Set.