1 23 24 package com.sun.enterprise.deployment.node.web; 25 26 import java.util.Map ; 27 import org.w3c.dom.Node ; 28 29 import com.sun.enterprise.deployment.ErrorPageDescriptorImpl; 30 import com.sun.enterprise.deployment.xml.WebTagNames; 31 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 32 33 39 public class ErrorPageNode extends DeploymentDescriptorNode { 40 41 47 protected Map getDispatchTable() { 48 Map table = super.getDispatchTable(); 49 table.put(WebTagNames.ERROR_CODE, "setErrorSignifierAsString"); 50 table.put(WebTagNames.EXCEPTION_TYPE, "setExceptionType"); 51 table.put(WebTagNames.LOCATION, "setLocation"); 52 return table; 53 } 54 55 63 public Node writeDescriptor(Node parent, String nodeName, ErrorPageDescriptorImpl descriptor) { 64 Node myNode = appendChild(parent, nodeName); 65 String exceptionType = descriptor.getExceptionType(); 66 if (exceptionType!=null && exceptionType.length()!=0) { 67 appendTextChild(myNode, WebTagNames.EXCEPTION_TYPE, exceptionType); 68 } else { 69 appendTextChild(myNode, WebTagNames.ERROR_CODE, descriptor.getErrorSignifierAsString()); 70 } 71 appendTextChild(myNode, WebTagNames.LOCATION, descriptor.getLocation()); 72 return myNode; 73 } 74 } 75 | Popular Tags |