code: public static void addEnvContextParam(Document doc, Element root) {
      Element ctxParam = doc.createElement("context-param");
      Element paramName = doc.createElement("param-name");
      paramName.appendChild(doc.createTextNode("shiroEnvironmentClass"));
      ctxParam.appendChild(paramName);
      Element paramValue = doc.createElement("param-value");
      paramValue.appendChild(doc.createTextNode("com.meltmedia.cadmium.servlets.shiro.WebEnvironment"));
      ctxParam.appendChild(paramValue);
  
      addRelativeTo(root, ctxParam, "listener", false);
    }
docs: Adds a context parameter to a web.xml file to override where the shiro environment class.
  @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.