public static String[] getParameters(HttpServletRequest request, String name) {
        if (name == null) {
            return new String[0];
        }
        String[] paramValues = request.getParameterValues(name);
        if (paramValues == null || paramValues.length == 0) {
            return new String[0];
        }
        else {
            java.util.List<String> values = new java.util.ArrayList<>(paramValues.length);
            for (int i = 0; i < paramValues.length; i++) {
                if (paramValues[i] != null && !"".equals(paramValues[i])) {
                    values.add(paramValues[i]);
                }
            }
            return values.toArray(new String[]{});
        }
    }
Returns a list of parameters of the same name

@param request an HttpServletRequest object.
@param name the name of the parameter you want to get
@return an array of non-null, non-blank strings of the same name. This
        method will return an empty array if no parameters were found.
xmppserver/src/main/java/org/jivesoftware/util/ParamUtils.java