Minor fixes

This commit is contained in:
Stuart Douglas
2018-09-19 18:37:38 +10:00
committed by Emmanuel Bernard
parent 969cd5eb23
commit 4b004279a4
2 changed files with 3 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ public class RequestContext implements AlterableContext {
try {
instance.destroy();
} catch (Exception e) {
throw new IllegalStateException("Unable to destroy instance" + instance.get());
throw new IllegalStateException("Unable to destroy instance" + instance.get(), e);
}
}
}

View File

@@ -16,6 +16,7 @@ import org.jboss.shamrock.runtime.StartupContext;
import io.undertow.Undertow;
import io.undertow.server.HttpHandler;
import io.undertow.server.HttpServerExchange;
import io.undertow.server.handlers.CanonicalPathHandler;
import io.undertow.server.handlers.resource.ClassPathResourceManager;
import io.undertow.servlet.Servlets;
import io.undertow.servlet.api.DeploymentInfo;
@@ -122,7 +123,7 @@ public class UndertowDeploymentTemplate {
if (undertow == null) {
undertow = Undertow.builder()
.addHttpListener(Integer.parseInt(port), "localhost")
.setHandler(ROOT_HANDLER)
.setHandler(new CanonicalPathHandler(ROOT_HANDLER))
.build();
undertow.start();
}