Package org.mortbay.jetty

Examples of org.mortbay.jetty.Server.addContext()


    webServer.addListener(listener);
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/");
    staticContext.setResourceBase(staticContent);
    staticContext.addHandler(new ResourceHandler());
    webServer.addContext(staticContext);
    return webServer;
  }
}
View Full Code Here


    webServer.addListener(listener);
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/");
    staticContext.setResourceBase(staticContent);
    staticContext.addHandler(new ResourceHandler());
    webServer.addContext(staticContext);
    return webServer;
  }
}
View Full Code Here

        HttpContext httpContext = new HttpContext();
        httpContext.setContextPath("/");
        ProxyHandler proxy = new ProxyHandler(true);
        proxy.useCyberVillains = false;
        httpContext.addHandler(proxy);
        server.addContext(httpContext);
        SocketListener listener = new SocketListener();
        listener.setPort(4444);
        server.addListener(listener);
        server.start();
    }
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.