code: private static void addSecurity(ZipFile inZip, ZipOutputStream outZip,
        ZipEntry e) throws Exception {
  
      DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
      DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
      Document doc = docBuilder.parse(inZip.getInputStream(e));
  
      Element root = doc.getDocumentElement();
  
      addListener(doc, root);
  
      addContextParam(doc, root);
  
      addEnvContextParam(doc, root);
  
      addFilter(doc, root);
  
      addFilterMapping(doc, root);
  
      storeXmlDocument(outZip, e, doc);
    }
docs: This will update the web.xml contained within a zip/war file to add a shiro security filter.
  @param inZip The zip file to pull the original web.xml file from.
  @param outZip The zip output stream to write the updated web.xml file to.
  @param e The zip entry the points to the web.xml file in the zip files.
  @throws Exception