code: private String[] getArgs(HttpServletRequest request)
     {
        ArrayList<String> argList = new ArrayList<String>();
  
        for (int i = 0; true; i++)
        {
           String name = "arg" + i;
           String value = request.getParameter(name);
  
           if (value == null)
              break;
  
           argList.add(value);
  
           if (trace)
              log.trace(name + "=" + value);
        }
  
        String[] args = new String[argList.size()];
        argList.toArray(args);
        return args;
     }
docs: Extract the argN values from the request into a String[]
  @param request The HTTP request
  @return The argument values