From 06eabf15fc01203b92fd32eac19c62cc33059ad4 Mon Sep 17 00:00:00 2001 From: microhuang Date: Sun, 24 Dec 2017 20:24:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcontenxpath=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java index 686d562ae68a..fe2424317e29 100755 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java @@ -65,7 +65,7 @@ public TomcatHttpServer(URL url, final HttpHandler handler) { tomcat.getConnector().setProperty("maxKeepAliveRequests", "-1"); tomcat.getConnector().setProtocol("org.apache.coyote.http11.Http11NioProtocol"); - Context context = tomcat.addContext("/", baseDir); + Context context = tomcat.addContext("", baseDir); //修复: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] Tomcat.addServlet(context, "dispatcher", new DispatcherServlet()); context.addServletMapping("/*", "dispatcher"); ServletManager.getInstance().addServletContext(url.getPort(), context.getServletContext()); From 74d5eb98fb831dbf6aef85bca710267fab147d77 Mon Sep 17 00:00:00 2001 From: microhuang Date: Sun, 24 Dec 2017 21:46:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcontenxpath=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java index fe2424317e29..f278bdfc89b3 100755 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java @@ -65,7 +65,7 @@ public TomcatHttpServer(URL url, final HttpHandler handler) { tomcat.getConnector().setProperty("maxKeepAliveRequests", "-1"); tomcat.getConnector().setProtocol("org.apache.coyote.http11.Http11NioProtocol"); - Context context = tomcat.addContext("", baseDir); //修复: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] + Context context = tomcat.addContext("", baseDir); //修复在tomcat8中警告:A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] Tomcat.addServlet(context, "dispatcher", new DispatcherServlet()); context.addServletMapping("/*", "dispatcher"); ServletManager.getInstance().addServletContext(url.getPort(), context.getServletContext()); From 44e7683aee75405628f15d764af88da7905881a1 Mon Sep 17 00:00:00 2001 From: microhuang Date: Sun, 24 Dec 2017 22:55:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcontenxpath=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java index f278bdfc89b3..c5fc36b89a4e 100755 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java @@ -65,7 +65,7 @@ public TomcatHttpServer(URL url, final HttpHandler handler) { tomcat.getConnector().setProperty("maxKeepAliveRequests", "-1"); tomcat.getConnector().setProtocol("org.apache.coyote.http11.Http11NioProtocol"); - Context context = tomcat.addContext("", baseDir); //修复在tomcat8中警告:A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] + Context context = tomcat.addContext("", baseDir); //修复在tomcat85中警告:A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to [] Tomcat.addServlet(context, "dispatcher", new DispatcherServlet()); context.addServletMapping("/*", "dispatcher"); ServletManager.getInstance().addServletContext(url.getPort(), context.getServletContext());