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..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); + 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());