1 17 18 19 package org.apache.catalina.startup; 20 21 import org.xml.sax.Attributes ; 22 23 import org.apache.tomcat.util.IntrospectionUtils; 24 import org.apache.tomcat.util.digester.Rule; 25 26 32 public class SetContextPropertiesRule extends Rule { 33 34 35 37 38 40 41 43 44 51 public void begin(String namespace, String nameX, Attributes attributes) 52 throws Exception { 53 54 for (int i = 0; i < attributes.getLength(); i++) { 55 String name = attributes.getLocalName(i); 56 if ("".equals(name)) { 57 name = attributes.getQName(i); 58 } 59 if ("path".equals(name) || "docBase".equals(name)) { 60 continue; 61 } 62 String value = attributes.getValue(i); 63 IntrospectionUtils.setProperty(digester.peek(), name, value); 64 } 65 66 } 67 68 69 } 70 | Popular Tags |