Ejemplo n.º 1
0
  public TestServer(Integer runningPort) {
    server = new Server(runningPort);

    ContextHandlerCollection contexts = new ContextHandlerCollection();

    WebAppContext webAppContext = new WebAppContext();
    webAppContext.setWar("./src/main/webapp");
    webAppContext.setContextPath("/");

    contexts.setHandlers(new Handler[] {webAppContext});

    setHandler(contexts);
  }