LoginConfigNodepublic class LoginConfigNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode This node handles the login-config xml tag |
Methods Summary |
---|
protected java.util.Map | getDispatchTable()all sub-implementation of this class can use a dispatch table to map xml element to
method name on the descriptor class for setting the element value.
Map table = super.getDispatchTable();
table.put(WebTagNames.AUTH_METHOD, "setAuthenticationMethod");
table.put(WebTagNames.REALM_NAME, "setRealmName");
table.put(WebTagNames.FORM_LOGIN_PAGE, "setFormLoginPage");
table.put(WebTagNames.FORM_ERROR_PAGE, "setFormErrorPage");
return table;
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.LoginConfigurationImpl descriptor)write the descriptor class to a DOM tree and return it
Node myNode = appendChild(parent, nodeName);
appendTextChild(myNode, WebTagNames.AUTH_METHOD, descriptor.getAuthenticationMethod());
appendTextChild(myNode, WebTagNames.REALM_NAME, descriptor.getRealmName());
String loginPage = descriptor.getFormLoginPage();
String errorPage =descriptor.getFormErrorPage();
if (loginPage!=null && loginPage.length()>0 && errorPage !=null && errorPage.length()>0) {
Node formNode = appendChild(myNode, WebTagNames.FORM_LOGIN_CONFIG);
appendTextChild(formNode, WebTagNames.FORM_LOGIN_PAGE, loginPage);
appendTextChild(formNode, WebTagNames.FORM_ERROR_PAGE, errorPage);
}
return myNode;
|
|