use of io.leopard.jetty.handler.HostResourceHandler in project leopard by tanhaichao.
the class ResourcesManager method addResource.
public static void addResource(String host, String resourceBase) {
HostResourceHandler handler = new HostResourceHandler(host, resourceBase);
handlerList.add(handler);
}
use of io.leopard.jetty.handler.HostResourceHandler in project leopard by tanhaichao.
the class WebappDaoImpl method getHandlerList.
protected Handler getHandlerList(List<String> hostList) {
// jettyServer.getWebappService().addHandler(new HostResourceHandler("ftrade.leopard.io", "/data/src/ftrade_html/"));
if (hostList.contains("fshop.leopard.io")) {
if (false) {
return new HostResourceHandler("fshop.leopard.io", "/data/src/fshop_html/");
}
HandlerList handlerList = new HandlerList();
handlerList.addHandler(new HostResourceHandler("fshop.leopard.io", "/data/src/fshop_html/"));
handlerList.addHandler(new HostResourceHandler("ftrade.leopard.io", "/data/src/ftrade_html/"));
try {
handlerList.start();
} catch (Exception e) {
e.printStackTrace();
}
return handlerList;
}
return null;
}
Aggregations