1 26 27 package org.objectweb.jonas_web.deployment.rules; 28 29 import org.apache.commons.digester.Digester; 30 31 import org.objectweb.jonas_lib.deployment.rules.InitParamRuleSet; 32 import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase; 33 import org.objectweb.jonas_lib.deployment.rules.RunAsRuleSet; 34 import org.objectweb.jonas_lib.deployment.rules.SecurityRoleRefRuleSet; 35 39 public class ServletRuleSet extends JRuleSetBase { 40 41 42 46 public ServletRuleSet(String prefix) { 47 super(prefix); 48 } 49 50 51 55 public void addRuleInstances(Digester digester) { 56 digester.addObjectCreate(prefix + "servlet", 57 "org.objectweb.jonas_web.deployment.xml.Servlet"); 58 digester.addSetNext(prefix + "servlet", 59 "addServlet", 60 "org.objectweb.jonas_web.deployment.xml.Servlet"); 61 62 digester.addCallMethod(prefix + "servlet/servlet-name", 63 "setServletName", 0); 64 65 digester.addCallMethod(prefix + "servlet/servlet-class", 66 "setServletClass", 0); 67 68 digester.addCallMethod(prefix + "servlet/jsp-file", 69 "setJspFile", 0); 70 71 digester.addRuleSet(new InitParamRuleSet(prefix + "servlet")); 72 digester.addRuleSet(new RunAsRuleSet(prefix + "servlet/")); 73 digester.addRuleSet(new SecurityRoleRefRuleSet(prefix + "servlet/")); 74 75 76 } 77 78 79 } 80 81 82 | Popular Tags |