code: public static void addContextParam(Document doc, Element root) {
      Element ctxParam = doc.createElement("context-param");
      Element paramName = doc.createElement("param-name");
      paramName.appendChild(doc.createTextNode("shiroConfigLocations"));
      ctxParam.appendChild(paramName);
      Element paramValue = doc.createElement("param-value");
      paramValue.appendChild(doc.createTextNode("file:" + new File(System
          .getProperty("com.meltmedia.cadmium.contentRoot"), "shiro.ini")
          .getAbsoluteFile().getAbsolutePath()));
      ctxParam.appendChild(paramValue);
  
      addRelativeTo(root, ctxParam, "listener", false);
    }
docs: Adds a context parameter to a web.xml file to override where the shiro config location is to be loaded from.
  The location loaded from will be represented by the "com.meltmedia.cadmium.contentRoot" system property.
  @param doc The xml DOM document to create the new xml elements with.
  @param root The xml Element node to add the context param to.