Package org.mortbay.jetty.handler

Examples of org.mortbay.jetty.handler.ContextHandlerCollection


        this.sslKeystore = sslKeystore;
    }

    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        collection.setServer(server);
        server.addHandler(collection);
        server.start();

        return server;
    }
View Full Code Here


    webServer.addConnector(listener);

    webServer.setThreadPool(new QueuedThreadPool());

    final String appDir = getWebAppsPath();
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    webServer.setHandler(contexts);

    webAppContext = new WebAppContext();
    webAppContext.setContextPath("/");
    webAppContext.setWar(appDir + "/" + name);
View Full Code Here

    webServer.addConnector(listener);

    webServer.setThreadPool(new BoundedThreadPool());

    final String appDir = getWebAppsPath();
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    webServer.setHandler(contexts);
    webAppContext = new WebAppContext();

    System.setProperty("java.naming.factory.initial",
        "org.mortbay.naming.InitialContextFactory");
View Full Code Here

    QueuedThreadPool threadPool = maxThreads == -1 ?
        new QueuedThreadPool() : new QueuedThreadPool(maxThreads);
    webServer.setThreadPool(threadPool);

    final String appDir = getWebAppsPath(name);
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    webServer.setHandler(contexts);

    webAppContext = new WebAppContext();
    webAppContext.setDisplayName(name);
    webAppContext.setContextPath("/");
View Full Code Here

                    getListener().getLowResourcePersistTimeMs().intValue();
                listener.setLowResourcePersistTimeMs(lowResourcePersistTime);
            }*/

            server.addConnector(connector);
            contexts = new ContextHandlerCollection();
            server.addHandler(contexts);
            try {
                server.start();
            } catch (Exception e) {
                e.printStackTrace();
View Full Code Here

        {
            repo.root.mkdirs();
        }

        repo.server = new Server();
        ContextHandlerCollection contexts = new ContextHandlerCollection();
        repo.server.setHandler( contexts );

        SocketConnector connector = new SocketConnector();
        connector.setPort( 0 ); // 0 means, choose and empty port. (we'll find out which, later)

        repo.server.setConnectors( new Connector[] { connector } );

        ContextHandler context = new ContextHandler();
        context.setContextPath( repo.context );
        context.setResourceBase( repo.root.getAbsolutePath() );
        context.setAttribute( "dirAllowed", true );
        context.setAttribute( "maxCacheSize", 0 );
        ServletHandler servlet = new ServletHandler();
        servlet.addServletWithMapping( DefaultServlet.class.getName(), "/" );
        context.setHandler( servlet );
        contexts.addHandler( context );

        repo.server.start();

        int port = connector.getLocalPort();
        repo.url = "http://localhost:" + port + repo.context;
View Full Code Here

        {
            repo.root.mkdirs();
        }

        repo.server = new Server( 0 );
        ContextHandlerCollection contexts = new ContextHandlerCollection();
        repo.server.setHandler( contexts );

        ContextHandler context = new ContextHandler();
        context.setContextPath( repo.context );
        context.setResourceBase( repo.root.getAbsolutePath() );
        context.setAttribute( "dirAllowed", true );
        context.setAttribute( "maxCacheSize", 0 );
        ServletHandler servlet = new ServletHandler();
        servlet.addServletWithMapping( DefaultServlet.class.getName(), "/" );
        context.setHandler( servlet );
        contexts.addHandler( context );

        repo.server.start();

        int port = repo.server.getConnectors()[0].getLocalPort();
        repo.url = "http://localhost:" + port + repo.context;
View Full Code Here

        // setup the system properties
        String busFactory = System.getProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME);
        System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, "org.apache.cxf.bus.CXFBusFactory");
        try {
            httpServer = new Server(9000);
            ContextHandlerCollection contexts = new ContextHandlerCollection();
            httpServer.setHandler(contexts);
           
            Context root = new Context(contexts, "/", Context.SESSIONS);
           
            CXFNonSpringServlet cxf = new CXFNonSpringServlet();
View Full Code Here

                        handlerList.addHandler(h);
                    }
                }
                server.addHandler(handlerList);
            }
            contexts = new ContextHandlerCollection();
            server.addHandler(contexts);
            if (defaultHandler != null) {
                server.addHandler(defaultHandler);
            }
            try {               
View Full Code Here

    webServer.addConnector(listener);

    webServer.setThreadPool(new QueuedThreadPool());

    final String appDir = getWebAppsPath();
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    webServer.setHandler(contexts);
    webAppContext = new WebAppContext();

    System.setProperty("java.naming.factory.initial",
        "org.mortbay.naming.InitialContextFactory");
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.handler.ContextHandlerCollection

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.