Package org.apache.catalina.core

Examples of org.apache.catalina.core.StandardHost.addChild()


    public void testDefaultResources() throws Exception {
        FileDirContext dirC = new FileDirContext();
        standardContext.setAllowLinking(true);
        standardContext.setResources(dirC);
        StandardHost host = new StandardHost();
        host.addChild(standardContext);
        host.setName("localhost");
        host.setAppBase("webapps");
        standardContext.resourcesStart();
        assertNotNull(standardContext.getResources());
        String aspectedResult = "<Context" + LF.LINE_SEPARATOR
View Full Code Here


            if (Lifecycle.PERIODIC_EVENT.equals(type)) {
                contextListener.checkHost(standardHost);
            } else if (Lifecycle.AFTER_START_EVENT.equals(type) && REMOTE_SUPPORT) {
                final TomEERemoteWebapp child = new TomEERemoteWebapp();
                if (!hasChild(standardHost, child.getName())) {
                    standardHost.addChild(child);
                } // else old tomee webapp surely
            }
        } else if (StandardServer.class.isInstance(source)) {
            final StandardServer standardServer = (StandardServer) source;
            final String type = event.getType();
View Full Code Here

    public void testDefaultResources() throws Exception {
        FileDirContext dirC = new FileDirContext();
        standardContext.setAllowLinking(true);
        standardContext.setResources(dirC);
        StandardHost host = new StandardHost();
        host.addChild(standardContext);
        host.setName("localhost");
        host.setAppBase("webapps");
        standardContext.resourcesStart();
        assertNotNull(standardContext.getResources());
        String aspectedResult = "<Context" + LF.LINE_SEPARATOR
View Full Code Here

            if (Lifecycle.PERIODIC_EVENT.equals(type)) {
                contextListener.checkHost(standardHost);
            } else if (Lifecycle.AFTER_START_EVENT.equals(type) && REMOTE_SUPPORT) {
                final TomEERemoteWebapp child = new TomEERemoteWebapp();
                if (!hasChild(standardHost, child.getName())) {
                    standardHost.addChild(child);
                } // else old tomee webapp surely
            }
        } else if (StandardServer.class.isInstance(source)) {
            StandardServer standardServer = (StandardServer) source;
            String type = event.getType();
View Full Code Here

            context.setParentClassLoader(Thread.currentThread().getContextClassLoader());
            context.setDocBase("");
            context.setPath("");
            ContextConfig config = new ContextConfig();
            ((Lifecycle)context).addLifecycleListener(config);
            host.addChild(context);
           
            // Install an HTTP connector
            Connector connector;
            try {
                engine.start();
View Full Code Here

    sw.addMapping("/info");
     
    // setup a virtual host.
    Host host = new StandardHost();
    host.setName("localhost");
    host.addChild(context);

    // setup an engine
    String engineBaseDir = new File("basedir").getAbsolutePath();
    System.setProperty(Globals.CATALINA_HOME_PROP, engineBaseDir);
    System.setProperty(Globals.CATALINA_BASE_PROP, engineBaseDir);
View Full Code Here

        };
        context.setLoader( webappLoader );

        final StandardHost host = new StandardHost();
        engine.addChild( host );
        host.addChild( context );

        return context;
    }

    public static MemCacheDaemon<? extends CacheElement> createDaemon( final InetSocketAddress address ) throws IOException {
View Full Code Here

    sw.addMapping("/info");
     
    // setup a virtual host.
    Host host = new StandardHost();
    host.setName("localhost");
    host.addChild(context);

    // setup an engine
    String engineBaseDir = new File("basedir").getAbsolutePath();
    System.setProperty(Globals.CATALINA_HOME_PROP, engineBaseDir);
    System.setProperty(Globals.CATALINA_BASE_PROP, engineBaseDir);
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.