Package org.apache.catalina

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


            }
            while (vhi.hasNext()) {
                host.addAlias(vhi.next());
            }
            context.setRealm(host.getRealm());
            host.addChild(context);
            context.getMapper().setDefaultHostName(host.getName());

            if (newHost) {
                hosts.put(engine.getName() + "." + hostName, host);
            }
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

        } 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

        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

        // 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

        } 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
        return context.getObjectName().toString();
View Full Code Here

         if (securityDomain != null) {
            configureContextSecurity();
         }

         host.addChild(context);
         context.create();
      } catch (Exception e) {
         throw ROOT_LOGGER.restContextCreationFailed(e);
      }
      try {
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

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.