Package org.apache.catalina.util.xml

Examples of org.apache.catalina.util.xml.XmlMapper$Rule


     * Create and configure the XmlMapper we will be using for shutdown.
     */
    protected XmlMapper createStopMapper() {

        // Initialize the mapper
        XmlMapper mapper = new XmlMapper();
        //        mapper.setDebug(999);

        // Configure the actions we will be using

        mapper.addRule("Server", mapper.objectCreate
                       ("org.apache.catalina.core.StandardServer",
                        "className"));
        mapper.addRule("Server", mapper.setProperties());
        mapper.addRule("Server", mapper.addChild
                       ("setServer", "org.apache.catalina.Server"));

        return (mapper);

    }
View Full Code Here


     * Start a new server instance.
     */
    protected void start() {

        // Create and execute our mapper
        XmlMapper mapper = createStartMapper();
        File file = configFile();
        try {
            mapper.readXml(file, this);
        } catch (InvocationTargetException e) {
            System.out.println("Catalina.start: InvocationTargetException");
            e.getTargetException().printStackTrace(System.out);
        } catch (Exception e) {
            System.out.println("Catalina.start: " + e);
View Full Code Here

     * Stop an existing server instance.
     */
    protected void stop() {

      // Create and execute our mapper
      XmlMapper mapper = createStopMapper();
      File file = configFile();
        try {
            mapper.readXml(file, this);
        } catch (Exception e) {
            System.out.println("Catalina.stop: " + e);
            e.printStackTrace(System.out);
            System.exit(1);
        }
View Full Code Here

                ((Engine)container).importDefaultContext(context);
            }
        }

        // Process the default and application web.xml files
        XmlMapper mapper = createWebMapper();
        defaultConfig(mapper);
        applicationConfig(mapper);

        // Scan tag library descriptor files for additional listener classes
        if (ok)
View Full Code Here

     * Start a new server instance.
     */
    public void load() {

        // Create and execute our mapper
        XmlMapper mapper = createStartMapper();
        File file = configFile();
        try {
            mapper.readXml(file, this);
        } catch (InvocationTargetException e) {
            System.out.println("Catalina.start: InvocationTargetException");
            e.getTargetException().printStackTrace(System.out);
        } catch (Exception e) {
            System.out.println("Catalina.start: " + e);
View Full Code Here

            String segment = currTextSegment.toString();
            List<Rule> parentMatches = getMatches().peek();
            int len = parentMatches.size();
            for ( int i = 0; i < len; ++i )
            {
                Rule r = parentMatches.get( i );
                if ( r instanceof TextSegmentHandler )
                {
                    TextSegmentHandler h = (TextSegmentHandler) r;
                    try
                    {
View Full Code Here

    {

        @Override
        protected void configure()
        {
            forPattern( "bar" ).addRule( new Rule()
            {

                @Override
                public void body( String namespace, String name, String text )
                    throws Exception
View Full Code Here

            Log log = getDigester().getLogger();
            boolean debug = log.isDebugEnabled();
            for ( int i = 0; i < rules.size(); i++ )
            {
                int j = ( rules.size() - i ) - 1;
                Rule rule = rules.get( j );
                if ( debug )
                {
                    log.debug( "  Fire end() for " + rule );
                }
                try
                {
                    rule.end( namespaceURI, name );
                }
                catch ( Exception e )
                {
                    throw getDigester().createSAXException( e );
                }
View Full Code Here

   */
  public String graph() throws Exception {
    StringBuffer text = new StringBuffer();
   
    text.append("digraph M5Tree {\n");
    Rule temp = (Rule)m_ruleSet.elementAt(0);
    temp.topOfTree().graph(text);
    text.append("}\n");
    return text.toString();
  }
View Full Code Here

TOP

Related Classes of org.apache.catalina.util.xml.XmlMapper$Rule

Copyright © 2018 www.massapicom. 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.