@Override
public synchronized HttpContext createContext(String path) {
+ if (!path.endsWith("/"))
+ path = path + "/";
if (contexts.containsKey(path))
throw new IllegalArgumentException("Context " + path + " already exists");
- if (!path.endsWith("/"))
- throw new IllegalArgumentException("Path " + path + " should end with a /");
JettyHttpContext httpContext = new ServletHttpContext(this, path);
contexts.put(path, httpContext);
/** Publishes one {@link CmsRcpServlet} per {@link CmsApp}. */
public class CmsRcpServletFactory {
private final static Logger logger = System.getLogger(CmsRcpServletFactory.class.getName());
- private CompletableFuture<HttpServer> httpServer =new CompletableFuture<>();
+ private CompletableFuture<HttpServer> httpServer = new CompletableFuture<>();
public void init() {
logger.log(Level.DEBUG, "Opened RCP UI " + uiName + " of CMS App /" + contextName);
}
});
+ }).exceptionally(e -> {
+ logger.log(Level.ERROR, "Cannot register RCO app " + contextName, e);
+ return null;
});
logger.log(Level.DEBUG, "Registered RCP CMS APP /" + contextName);
}