Package org.mortbay.http

Examples of org.mortbay.http.HttpContext.addHandler()


    // set up the context for "/static/*"
    String appDir = getWebAppsPath();
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
    staticContext.setResourceBase(appDir + "/static");
    staticContext.addHandler(new ResourceHandler());
    webServer.addContext(staticContext);

    // set up the context for "/" jsp files
    webAppContext =
      webServer.addWebApplication("/", appDir + "/" + name);
View Full Code Here


    String logDir = System.getProperty("hadoop.log.dir");
    if (logDir != null) {
      HttpContext logContext = new HttpContext();
      logContext.setContextPath("/logs/*");
      logContext.setResourceBase(logDir);
      logContext.addHandler(new ResourceHandler());
      webServer.addContext(logContext);
    }
   
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
 
View Full Code Here

    }
   
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
    staticContext.setResourceBase(appDir + "/static");
    staticContext.addHandler(new ResourceHandler());
    this.webServer.addContext(staticContext);

    // set up the context for "/" jsp files
    String webappDir = null;
    try {
View Full Code Here

    String logDir = System.getProperty("hadoop.log.dir");
    if (logDir != null) {
      HttpContext logContext = new HttpContext();
      logContext.setContextPath("/logs/*");
      logContext.setResourceBase(logDir);
      logContext.addHandler(new ResourceHandler());
      webServer.addContext(logContext);
    }
   
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
 
View Full Code Here

    }
   
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
    staticContext.setResourceBase(appDir + "/static");
    staticContext.addHandler(new ResourceHandler());
    this.webServer.addContext(staticContext);

    // set up the context for "/" jsp files
    String webappDir = getWebAppDir(name);
    this.webAppContext =
View Full Code Here

    String logDir = System.getProperty("hadoop.log.dir");
    if (logDir != null) {
      HttpContext logContext = new HttpContext();
      logContext.setContextPath("/logs/*");
      logContext.setResourceBase(logDir);
      logContext.addHandler(new ResourceHandler());
      webServer.addContext(logContext);
    }

    // set up the context for "/static/*"
    String appDir = getWebAppsPath();
View Full Code Here

    // set up the context for "/static/*"
    String appDir = getWebAppsPath();
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
    staticContext.setResourceBase(appDir + "/static");
    staticContext.addHandler(new ResourceHandler());
    webServer.addContext(staticContext);

    // set up the context for "/" jsp files
    webAppContext =
      webServer.addWebApplication("/", appDir + "/" + name);
View Full Code Here

      webserver.addWebApplication("/", webappRoot);
     
      HttpContext imagesContext = new HttpContext();
      imagesContext.setContextPath("/images/*");
      imagesContext.setResourceBase(ApplicationSetup.TERRIER_SHARE + "/images/");
      imagesContext.addHandler(new ResourceHandler());
      webserver.addContext(imagesContext);
  }

  /**
   * start webserver
View Full Code Here

        context.setContextPath("/selenium-server");
        context.setMimeMapping("xhtml", "application/xhtml+xml");

        addSecurityHandler(context);
        addStaticContentHandler(slowResources, configuration, context);
        context.addHandler(new SessionExtensionJsHandler());
        context.addHandler(new SingleTestSuiteResourceHandler());
        postResultsHandler = new SeleniumHTMLRunnerResultsHandler();
        context.addHandler(postResultsHandler);
        context.addHandler(new CachedContentTestHandler());
        server.addContext(context);
View Full Code Here

        context.setMimeMapping("xhtml", "application/xhtml+xml");

        addSecurityHandler(context);
        addStaticContentHandler(slowResources, configuration, context);
        context.addHandler(new SessionExtensionJsHandler());
        context.addHandler(new SingleTestSuiteResourceHandler());
        postResultsHandler = new SeleniumHTMLRunnerResultsHandler();
        context.addHandler(postResultsHandler);
        context.addHandler(new CachedContentTestHandler());
        server.addContext(context);
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.