Package org.apache.catalina

Examples of org.apache.catalina.Host.addChild()


        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
        host.addChild(context);

        // Return the corresponding MBean name
        ObjectName oname =
            MBeanUtils.createObjectName(pname.getDomain(), context);
        return (oname.toString());
View Full Code Here


        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        Service service = getService(pname);
        Engine engine = (Engine) service.getContainer();
        Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
        host.addChild(context);

        // Return the corresponding MBean name
        ObjectName oname =
            MBeanUtils.createObjectName(pname.getDomain(), context);
        return (oname.toString());
View Full Code Here

        Host host = embedded.createHost("localhost", home + "/webapps");
        engine.addChild(host);

        Context root = embedded.createContext("", home + "/webapps/ROOT");
        host.addChild(root);

        Context examples = embedded.createContext("/examples",
                                                  home + "/webapps/examples");
        customize(examples);    // Special customization for this web-app
        host.addChild(examples);
View Full Code Here

        host.addChild(root);

        Context examples = embedded.createContext("/examples",
                                                  home + "/webapps/examples");
        customize(examples);    // Special customization for this web-app
        host.addChild(examples);

        // As an alternative to the three lines above, there is also a very
        // simple method to deploy a new application that has default values
        // for all context properties:
        //   String contextPath = ... context path for this app ...
View Full Code Here

                    {
                        host.addAlias( alias );
                    }
                }

                host.addChild( context );
                createStaticContext( container, context, host );
                if ( addContextWarDependencies || !getAdditionalWebapps().isEmpty() )
                {
                    Collection<Context> dependencyContexts = createDependencyContexts( container );
                    for ( Context extraContext : dependencyContexts )
View Full Code Here

                if ( addContextWarDependencies || !getAdditionalWebapps().isEmpty() )
                {
                    Collection<Context> dependencyContexts = createDependencyContexts( container );
                    for ( Context extraContext : dependencyContexts )
                    {
                        host.addChild( extraContext );
                    }
                }

                // create engine
                Engine engine = container.createEngine();
View Full Code Here

        if (contextConfigFile.exists())
            context.setConfigFile(contextConfigFile.getAbsolutePath());

        context.setLoader(new WebappLoader(this.getClass().getClassLoader()));

        host.addChild(context);

        tomcatServer.addEngine(engine);

        Connector http = tomcatServer.createConnector("localhost", port, false);
        http.setAllowTrace(true);
View Full Code Here

        } else {
            log.warn("Deployer not found for "+pname.getKeyProperty("host"));
            Service service = getService(pname);
            Engine engine = (Engine) service.getContainer();
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            host.addChild(context);
        }

        // Return the corresponding MBean name
        ObjectName oname = context.getJmxName();
View Full Code Here

        } else {
            log.warn("Deployer not found for "+pname.getKeyProperty("host"));
            Service service = getService(pname);
            Engine engine = (Engine) service.getContainer();
            Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
            host.addChild(context);
        }

        // Return the corresponding MBean name
        ObjectName oname = context.getJmxName();
View Full Code Here

                wccsWrapper.setServletClass(wccs.getClass().getName());
                context.addChild(wccsWrapper);

                context.addServletMapping("/console", "WelcomeContextConsoleServlet");

                host.addChild(context);
                context.create();
            } catch (Exception e) {
                throw new StartException("failed to create context", e);
            }
            try {
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.