Package org.eclipse.jetty.server.handler

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


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

            ServletContextHandler root = new ServletContextHandler(contexts, "/",
                                                                   ServletContextHandler.SESSIONS);
            Bus bus = BusFactory.getDefaultBus(true);
View Full Code Here

                            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

            this.server.setSendDateHeader(true);
            this.server.setSendServerVersion(this.config.isSendServerHeader());

            this.server.addBean(new HashLoginService("OSGi HTTP Service Realm"));

            this.parent = new ContextHandlerCollection();

            ServletContextHandler context = new ServletContextHandler(this.parent, this.config.getContextPath(), ServletContextHandler.SESSIONS);

            configureSessionManager(context);
            context.addEventListener(eventDispatcher);
View Full Code Here

                    } else {
                        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

        {
            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

    /**
     * Create a Jetty module.
     */
    public AdminConsolePlugin() {
        contexts = new ContextHandlerCollection();
       
        // Configure Jetty logging to a more reasonable default.
        System.setProperty("org.eclipse.jetty.util.log.class", "org.jivesoftware.util.log.util.JettyLog");
        // JSP 2.0 uses commons-logging, so also override that implementation.
        System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");
View Full Code Here

        // JSP 2.0 uses commons-logging, so also override that implementation.
        System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");

        PropertyEventDispatcher.addListener(new HttpServerPropertyListener());
        this.httpSessionManager = new HttpSessionManager();
        contexts = new ContextHandlerCollection();
    }
View Full Code Here

        handlerArray[0] = boshHandler;
        for (int i = 0; i < handlers.size(); i++) {
            handlerArray[i+1] = handlers.get(i);
        }
       
        final ContextHandlerCollection handlerCollection = new ContextHandlerCollection();
        handlerCollection.setHandlers(handlerArray);
        return handlerCollection;
       
    }
View Full Code Here

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

        // configure thread pool if min/max given
        if (minThreads != null || maxThreads != null) {
            if (getThreadPool() != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.server.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.