Package org.apache.tomcat.util.xml

Examples of org.apache.tomcat.util.xml.XmlMapper.addRule()


  mapper.addRule("Engine/Resources", mapper.objectCreate("org.apache.tomcat.core.StandardResources", "className"));
  mapper.addRule("Engine/Resources", mapper.setProperties());
  mapper.addRule("Engine/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));

  mapper.addRule("Engine/Valve", mapper.objectCreate(null, "className"));
  mapper.addRule("Engine/Valve", mapper.setProperties());
  mapper.addRule("Engine/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));

  return (mapper);

  // FIXME - When do we call start() on all of these objects?
View Full Code Here


  mapper.addRule("Engine/Resources", mapper.setProperties());
  mapper.addRule("Engine/Resources", mapper.addChild("setResources", "org.apache.tomcat.Resources"));

  mapper.addRule("Engine/Valve", mapper.objectCreate(null, "className"));
  mapper.addRule("Engine/Valve", mapper.setProperties());
  mapper.addRule("Engine/Valve", mapper.addChild("addValve", "org.apache.tomcat.Valve"));

  return (mapper);

  // FIXME - When do we call start() on all of these objects?
View Full Code Here

  //  checkHooks(cm, ctx, module);
  if( this != module ) return;
  setupHookFinder();
  XmlMapper xh=new XmlMapper();
  xh.setDebug( debug );
  xh.addRule( "ContextManager", xh.setProperties() );
  setPropertiesRules( cm, xh );
  setTagRules( xh );
  addDefaultTags(cm, xh);
  //addTagRules( cm, xh );
  setBackward( xh );
View Full Code Here

            }
            XmlMapper xh=new XmlMapper();
            if( getDebug() > 5 ) xh.setDebug( 2 );

            // call addUser using attributes as parameters
            xh.addRule("tomcat-users/user",
                       new XmlAction() {
                               public void start(SaxContext sctx) throws Exception {
                                   int top=sctx.getTagCount()-1;
                                   MemoryRealm mr=(MemoryRealm)sctx.getRoot();
                                   AttributeList attributes = sctx.getAttributeList( top );
View Full Code Here

      // By using dtdURL you brake most parsers ( at least xerces )
      xh.registerDTDRes("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
            "org/apache/tomcat/resources/web.dtd");

      xh.addRule("web-app/context-param", xh.methodSetter("addInitParameter", 2) );
      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
View Full Code Here

      // By using dtdURL you brake most parsers ( at least xerces )
      xh.registerDTDRes("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
            "org/apache/tomcat/resources/web.dtd");

      xh.addRule("web-app/context-param", xh.methodSetter("addInitParameter", 2) );
      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
      xh.addRule("web-app/distributable", xh.methodSetter("setDistributable", 0) );
View Full Code Here

      xh.registerDTDRes("-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN",
            "org/apache/tomcat/resources/web.dtd");

      xh.addRule("web-app/context-param", xh.methodSetter("addInitParameter", 2) );
      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
      xh.addRule("web-app/distributable", xh.methodSetter("setDistributable", 0) );
View Full Code Here

      xh.addRule("web-app/context-param", xh.methodSetter("addInitParameter", 2) );
      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
      xh.addRule("web-app/distributable", xh.methodSetter("setDistributable", 0) );

      xh.addRule("web-app/servlet-mapping", xh.methodSetter("addServletMapping", 2) );
      xh.addRule("web-app/servlet-mapping/servlet-name", xh.methodParam(1) );
View Full Code Here

      xh.addRule("web-app/context-param", xh.methodSetter("addInitParameter", 2) );
      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
      xh.addRule("web-app/distributable", xh.methodSetter("setDistributable", 0) );

      xh.addRule("web-app/servlet-mapping", xh.methodSetter("addServletMapping", 2) );
      xh.addRule("web-app/servlet-mapping/servlet-name", xh.methodParam(1) );
      xh.addRule("web-app/servlet-mapping/url-pattern", xh.methodParam(0) );
View Full Code Here

      xh.addRule("web-app/context-param/param-name", xh.methodParam(0) );
      xh.addRule("web-app/context-param/param-value", xh.methodParam(1) );

      xh.addRule("web-app/description", xh.methodSetter("setDescription", 0) );
      xh.addRule("web-app/icon/small-icon", xh.methodSetter("setIcon", 0) );
      xh.addRule("web-app/distributable", xh.methodSetter("setDistributable", 0) );

      xh.addRule("web-app/servlet-mapping", xh.methodSetter("addServletMapping", 2) );
      xh.addRule("web-app/servlet-mapping/servlet-name", xh.methodParam(1) );
      xh.addRule("web-app/servlet-mapping/url-pattern", xh.methodParam(0) );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.