code: public static void addDispatchers(Document doc, Element filterMapping,
        String... names) {
      if (names != null) {
        for (String name : names) {
          Element dispatcher = doc.createElement("dispatcher");
          dispatcher.appendChild(doc.createTextNode(name));
          filterMapping.appendChild(dispatcher);
        }
      }
    }
docs: Adds dispatchers for each item in the vargs parameter names to a
  filter mapping element of a web.xml file.
  @param doc The xml DOM document to create the new xml elements with.
  @param filterMapping The filter mapping element to append to from a web.xml document.
  @param names The names of the dispatchers to add.