Package org.mortbay.jetty.handler

Examples of org.mortbay.jetty.handler.ContextHandlerCollection


        if (_sessionIdMgr == null || _sessionMgr1 == null || _sessionMgr2 == null)
            throw new IllegalStateException ("Must set a SessionIdManager instance and 2 SessionManager instances");

        setSessionIdManager(_sessionIdMgr);
        //set up 2 contexts and a filter than can forward between them
        ContextHandlerCollection contextsA = new ContextHandlerCollection();
        setHandler(contextsA);
        setSessionIdManager(_sessionIdMgr);

        Context contextA1 = new Context(contextsA,"/contextA",Context.SESSIONS);
        contextA1.addServlet(new ServletHolder(new SessionActionServlet()), "/session/*");
 
View Full Code Here


            this.requestLogHandler.setRequestLog(this.requestLog);
       
        this.contexts = (ContextHandlerCollection)server.getChildHandlerByClass(ContextHandlerCollection.class);
        if (this.contexts==null)
        {  
            this.contexts = new ContextHandlerCollection();
            this.handlers = (HandlerCollection)server.getChildHandlerByClass(HandlerCollection.class);
            if (this.handlers==null)
            {
                this.handlers = new HandlerCollection();              
                this.server.setHandler(handlers);                           
View Full Code Here

    public JettyHttpServer()
    {
        _server = new Server();
        HandlerCollection handlerCollection = new HandlerCollection();
        _contextCollection = new ContextHandlerCollection();
        handlerCollection.setHandlers(new Handler[] {_contextCollection, new DefaultHandler()});
        _server.setHandler(handlerCollection);
    }
View Full Code Here

    this("0.0.0.0", 0);
  }
 
  public EmbeddedWebServer(String host, int port) {
    server = new Server();
    handler = new ContextHandlerCollection();
    root = new Context(handler, "/", new SessionHandler(), null, null, null);
   
    if (EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE))
        || EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS))
        || EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE))
View Full Code Here

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

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

    webAppContext = new WebAppContext();
    webAppContext.setContextPath("/");
    webAppContext.setWar(appDir + "/" + name);
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();

    webAppContext = new WebAppContext();
    webAppContext.setDisplayName(name);
    webAppContext.setContextPath("/");
    webAppContext.setResourceBase(appDir + "/" + name);
    webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");

    contexts.addHandler(webAppContext);
    webServer.setHandler(contexts);

    addDefaultApps(contexts, appDir, conf);
  }
View Full Code Here

      AbstractSessionManager asm = (AbstractSessionManager)sm;
      asm.setHttpOnly(true);
      asm.setSecureCookies(true);
    }

    ContextHandlerCollection contexts = new ContextHandlerCollection();
    RequestLog requestLog = HttpRequestLog.getRequestLog(name);

    if (requestLog != null) {
      RequestLogHandler requestLogHandler = new RequestLogHandler();
      requestLogHandler.setRequestLog(requestLog);
View Full Code Here

        new QueuedThreadPool() : new QueuedThreadPool(maxThreads);
    threadPool.setDaemon(true);
    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

    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

                        handlerList.addHandler(h);
                    }
                }
                server.addHandler(handlerList);
            }
            contexts = new ContextHandlerCollection();
            server.addHandler(contexts);
            if (defaultHandler != null) {
                server.addHandler(defaultHandler);
            }
            try {               
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.