1 23 24 package com.sun.enterprise.deployment.node.web; 25 26 import java.util.Map ; 27 import java.util.Enumeration ; 28 import org.w3c.dom.Node ; 29 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 30 import com.sun.enterprise.deployment.node.XMLElement; 31 import com.sun.enterprise.deployment.JspConfigDescriptor; 32 import com.sun.enterprise.deployment.TagLibConfigurationDescriptor; 33 import com.sun.enterprise.deployment.JspGroupDescriptor; 34 import com.sun.enterprise.deployment.xml.WebTagNames; 35 36 39 public class JspConfigNode extends DeploymentDescriptorNode { 40 public JspConfigNode() { 41 super(); 42 registerElementHandler(new XMLElement(WebTagNames.TAGLIB), TagLibNode.class, "addTagLib"); 43 registerElementHandler(new XMLElement(WebTagNames.JSP_GROUP), JspGroupNode.class, "addJspGroup"); 44 } 45 46 54 public Node writeDescriptor(Node parent, String nodeName, JspConfigDescriptor descriptor) { 55 Node myNode = appendChild(parent, nodeName); 56 TagLibNode lNode = new TagLibNode(); 57 for(Enumeration en = descriptor.getTagLibs(); en.hasMoreElements();) { 58 lNode.writeDescriptor(myNode, WebTagNames.TAGLIB, 59 (TagLibConfigurationDescriptor) en.nextElement()); 60 } 61 JspGroupNode jspGroup = new JspGroupNode(); 62 for(Enumeration en = descriptor.getJspGroups(); en.hasMoreElements();) { 63 jspGroup.writeDescriptor(myNode, WebTagNames.JSP_GROUP, 64 (JspGroupDescriptor) en.nextElement()); 65 } 66 67 return myNode; 68 } 69 } 70 | Popular Tags |