Package org.eclipse.jetty.server.handler

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


      WebAppContext context = new WebAppContext(warFile, contextPath);
      context.setServer(srv);
      resetTempDirectory(context, currentDir);

      // Add the handlers
      HandlerList handlers = new HandlerList();
      handlers.addHandler(context);
      srv.setHandler(handlers);

      srv.start();
      srv.join();
    } catch (Exception e) {
View Full Code Here


      WebAppContext context = new WebAppContext(warFile, contextPath);
      context.setServer(srv);
      resetTempDirectory(context, currentDir);

      // Add the handlers
      HandlerList handlers = new HandlerList();
      handlers.addHandler(context);
      srv.setHandler(handlers);

      srv.start();
      srv.join();
    } catch (Exception e) {
View Full Code Here

        resource_handler.setDirectoriesListed(true);
        resource_handler.setWelcomeFiles(new String[]{ "index.html" });
        resource_handler.setResourceBase(path);
        HandlerList handlers = new HandlerList();
        handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() });
        server.setHandler(handlers);
        LOGGER.info("Serving out contents of: [{}] on http://localhost:{}/", path, port);
        LOGGER.info("(To stop server hit CTRL-C)");
       
View Full Code Here

    ResourceHandler resourceHandler = new ResourceHandler();
    resourceHandler.setDirectoriesListed(false);
    resourceHandler.setResourceBase(webDir.getAbsolutePath());

    // ----- add the handlers to the list handler -----
    HandlerList handlers = new HandlerList();
    handlers.addHandler(servletContext);
    handlers.addHandler(pactPlanContext);
    handlers.addHandler(resourceHandler);

    // ----- create the login module with http authentication -----

    File af = null;
    String authFile = config.getString(ConfigConstants.WEB_ACCESS_FILE_KEY,
View Full Code Here

    List<Handler> _handlers = new ArrayList<Handler>();

    _handlers.add(_ctx);

    HandlerList _contexts = new HandlerList();
    _contexts.setHandlers(_handlers.toArray(new Handler[0]));

    RequestLogHandler _log = new RequestLogHandler();
    _log.setRequestLog(createRequestLog());

    HandlerCollection _result = new HandlerCollection();
View Full Code Here

        // add handlers to Jetty
        StatisticsHandler statsHandler = new StatisticsHandler();
        statsHandler.setHandler(handlers);

        HandlerList rootHandlers = new HandlerList();
        if (theAdminServlet != null && config.isAdminEnabled()) {
            rootHandlers.addHandler(createServletContext(theAdminServlet, adminParameters, adminFilters, tokenManager, loginService, "admin"));
        }
        rootHandlers.addHandler(statsHandler);
        server.setHandler(rootHandlers);
    }
View Full Code Here

    context.setWar(warUrl.toExternalForm());
    // We store the command line object as a webapp context attribute so it can
    // be used by the context loader to inject additional beans as needed
    context.setAttribute(WebappCommon.COMMAND_LINE_CONTEXT_ATTRIBUTE, cli);

    HandlerList handlers = new HandlerList();
    handlers.setHandlers(new Handler[] {new WelcomeFileHandler(context), context});

    server.setHandler(handlers);

    /**
     * We specify a Jetty override descriptor to inject additional definitions
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
         {
            constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/html/templates/", "default404.html")),
            constructHandler(STUBS_CONNECTOR_NAME, "/", staticResourceHandler("ui/images/", "favicon.ico")),
            constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
         {
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, staticResourceHandler("ui/html/", "default404.html")),
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, staticResourceHandler("ui/images/", "favicon.ico")),
            constructHandler(STUBS_CONNECTOR_NAME, ROOT_PATH_INFO, new StubsHandler(stubbedDataManager)),
View Full Code Here

   }

   private HandlerList constructHandlers() {

      final JettyContext jettyContext = new JettyContext(currentHost, currentStubsPort, currentStubsSslPort, currentAdminPort);
      final HandlerList handlers = new HandlerList();
      handlers.setHandlers(new Handler[]
            {
                  constructHandler(STUBS_CONNECTOR_NAME, "/", new StubsHandler(dataStore)),
                  constructHandler(SSL_CONNECTOR_NAME, "/", new SslHandler(dataStore)),

                  constructHandler(ADMIN_CONNECTOR_NAME, "/stubdata/new", new StubsRegistrationHandler(dataStore, yamlParser)),
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.server.handler.HandlerList

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.