// Check with the security manger
checkPublishEndpointPermission();
// Create and start the HTTP server
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();
httpServer.setProperties(properties);
httpServer.start();
String path = addrURI.getPath();
String contextRoot = "/" + new StringTokenizer(path, "/").nextToken();
HttpContext context = httpServer.createContext(contextRoot);
publish(context);
}