From 3e6443251c04fc4c9f78b2e368c9d91b78c282c1 Mon Sep 17 00:00:00 2001 From: rinoux Date: Sun, 28 Apr 2019 10:06:41 +0800 Subject: [PATCH] =?UTF-8?q?DEC-7537=20=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0url=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/start/server/FineEmbedServerActivator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java index 2d08b286d..0d9e278e9 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java @@ -6,6 +6,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; import com.fr.module.ModuleRole; import com.fr.stable.EncodeConstants; +import com.fr.stable.ProductConstants; import com.fr.startup.FineWebApplicationInitializer; import com.fr.third.springframework.web.SpringServletContainerInitializer; import com.fr.third.springframework.web.context.support.AnnotationConfigWebApplicationContext; @@ -62,6 +63,8 @@ public class FineEmbedServerActivator extends Activator { // 设置解码uri使用的字符编码 tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8); String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); + //内置的上下文是自己定的,这里把WEB_APP_NAME一并设置了,否则下面appName是/null + ProductConstants.WEB_APP_NAME = ProductConstants.getAppFolderName(); String appName = "/" + FRContext.getCommonOperator().getAppName(); Context context = tomcat.addContext(appName, docBase); Tomcat.initWebappDefaults(context);