code: protected void initLoginConfig(XmlParser.Node node)
      {
          XmlParser.Node method=node.get("auth-method");
          FormAuthenticator _formAuthenticator=null;
          if(method!=null)
          {
              Authenticator authenticator=null;
              String m=method.toString(false,true);
              if(SecurityConstraint.__FORM_AUTH.equals(m))
                  authenticator=_formAuthenticator=new FormAuthenticator();
              else if(SecurityConstraint.__BASIC_AUTH.equals(m))
                  authenticator=new BasicAuthenticator();
              else if(SecurityConstraint.__DIGEST_AUTH.equals(m))
                  authenticator=new DigestAuthenticator();
              else if(SecurityConstraint.__CERT_AUTH.equals(m))
                  authenticator=new ClientCertAuthenticator();
              else if(SecurityConstraint.__CERT_AUTH2.equals(m))
                  authenticator=new ClientCertAuthenticator();
              else
                  log.warn("UNKNOWN AUTH METHOD: "+m);
              getWebApplicationContext().setAuthenticator(authenticator);
          }
          XmlParser.Node name=node.get("realm-name");
          if(name!=null)
              getWebApplicationContext().setRealmName(name.toString(false,true));
          XmlParser.Node formConfig=node.get("form-login-config");
          if(formConfig!=null)
          {
              if(_formAuthenticator==null)
                  log.warn("FORM Authentication miss-configured");
              else
              {
                  XmlParser.Node loginPage=formConfig.get("form-login-page");
                  if(loginPage!=null)
                      _formAuthenticator.setLoginPage(loginPage.toString(false,true));
                  XmlParser.Node errorPage=formConfig.get("form-error-page");
                  if(errorPage!=null)
                  {
                      String ep=errorPage.toString(false,true);
                      _formAuthenticator.setErrorPage(ep);
                  }
              }
          }
      }
docs: /* ------------------------------------------------------------