Examples of ContextHandlerCollection


Examples of org.eclipse.jetty.server.handler.ContextHandlerCollection

        return camelServlet;
    }
   
    protected Server createServer() throws Exception {
        Server server = new Server();
        ContextHandlerCollection collection = new ContextHandlerCollection();
        server.setHandler(collection);
        return server;
    }
View Full Code Here

Examples of org.eclipse.jetty.server.handler.ContextHandlerCollection

        {
            repo.root.mkdirs();
        }

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

        ServletContextHandler context = new ServletContextHandler();
        context.setContextPath( repo.context );
        context.setResourceBase( repo.root.getAbsolutePath() );
        context.setAttribute( "dirAllowed", true );
        context.setAttribute( "maxCacheSize", 0 );

        ServletHolder sh = new ServletHolder( DefaultServlet.class );
        context.addServlet( sh, "/" );

        contexts.addHandler( context );

        repo.server.start();

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

Examples of org.eclipse.jetty.server.handler.ContextHandlerCollection

                            handlerCollection.addHandler(h);
                        }
                    }
                }
            }
            contexts = new ContextHandlerCollection();
            /*
             * handlerCollection may be null here if is only one handler to deal with.
             * Which in turn implies that there can't be a 'defaultHander' to deal with.
             */
            if (handlerCollection != null) {
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

                }

                // bind to Jetty HTTP server
                if (jetty != null) {
                    if(context == null) {
                        context = new ContextHandlerCollection();
                        jetty.getHttpServer().setHandler(context);
                    }

                    // if there is a static direcory specified, mount it
                    if (staticDir != null) {
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

    {
      connector
    });
   
    HandlerCollection handlers = new HandlerCollection();
    ContextHandlerCollection contexts = new ContextHandlerCollection();

    WebAppContext webAppContext1 = new WebAppContext("samples/actiontest/dist/actiontest", "/actiontest");
    WebAppContext webAppContext2 = new WebAppContext("samples/holiday-booking/dist/holidaybooking",
        "/holidaybooking");
    contexts.addHandler(webAppContext1);
    contexts.addHandler(webAppContext2);
   
    /*
    This code is required for hot deployment, although
    it needs to point to a valid jetty.xml file to work
    correctly (ie it won't currently work)
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

        this.cacheFolder = cacheFolder;
        cacheFolder.mkdirs();

        server = new Server();

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

        Context root = new Context(contexts, "/", Context.SESSIONS);
        root.addServlet(new ServletHolder(this), "/");
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

    webServer.addConnector(listener);

    webServer.setThreadPool(new QueuedThreadPool());

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

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

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

    public TerracottaJettyServer(int port, int maxInactivePeriod, int scavengePeriod)
    {
        this.server = new Server(port);
        this.maxInactivePeriod = maxInactivePeriod;
        this.scavengePeriod = scavengePeriod;
        this.contexts = new ContextHandlerCollection();
        this.sessionIdManager = new TerracottaSessionIdManager(server);
    }
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

        // 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(Integer.parseInt(PORT));
            ContextHandlerCollection contexts = new ContextHandlerCollection();
            httpServer.setHandler(contexts);

            Context root = new Context(contexts, "/", Context.SESSIONS);

            CXFNonSpringServlet cxf = new CXFNonSpringServlet();
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandlerCollection

    // Implementation methods
    // -------------------------------------------------------------------------

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