Work on CMS file system implementation
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / runtime / CmsDeploymentImpl.java
index 265cb34a073b4443d65316f74749332d54b67695..f9a1dc36832dab593fb28d53017679f8db5f400c 100644 (file)
@@ -90,6 +90,11 @@ public class CmsDeploymentImpl implements CmsDeployment {
        }
 
        public void createHttpContext(String contextPath, HttpHandler httpHandler, CmsAuthenticator authenticator) {
+               if (!httpExpected) {
+                       if (log.isTraceEnabled())
+                               log.warn("Ignore HTTP context " + contextPath + " as we don't provide an HTTP server");
+                       return;
+               }
                HttpContext httpContext = httpServer.join().createContext(contextPath);
                // we want to set the authenticator BEFORE the handler actually becomes active
                httpContext.setAuthenticator(authenticator);