Browse Source

Merge pull request #250 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit 'e4ca82b81d44110ab1bda27686bb9fd8240d2eed':
  REPORT-9843 【10.0二轮回归】ie9及以上版本,预览添加css样式的模板,样式不加载
master
kerry 6 years ago
parent
commit
d7966bd084
  1. 17
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

17
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -12,8 +12,6 @@ import com.fr.third.springframework.web.context.support.AnnotationConfigWebAppli
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import org.apache.catalina.Context; import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleException;
import org.apache.catalina.Wrapper;
import org.apache.catalina.loader.WebappLoader; import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.Tomcat;
@ -62,7 +60,7 @@ public class FineEmbedServerActivator extends Activator {
String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); String docBase = new File(WorkContext.getCurrent().getPath()).getParent();
String appName = "/" + FRContext.getCommonOperator().getAppName(); String appName = "/" + FRContext.getCommonOperator().getAppName();
Context context = tomcat.addContext(appName, docBase); Context context = tomcat.addContext(appName, docBase);
addDefaultServlet(context); Tomcat.initWebappDefaults(context);
//覆盖tomcat的WebAppClassLoader //覆盖tomcat的WebAppClassLoader
context.setLoader(new FRTomcatLoader()); context.setLoader(new FRTomcatLoader());
@ -73,19 +71,6 @@ public class FineEmbedServerActivator extends Activator {
context.addServletContainerInitializer(initializer, classes); context.addServletContainerInitializer(initializer, classes);
} }
private void addDefaultServlet(Context context) {
Wrapper defaultServlet = context.createWrapper();
defaultServlet.setName("default");
defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet");
defaultServlet.addInitParameter("debug", "0");
defaultServlet.addInitParameter("listings", "false");
defaultServlet.setLoadOnStartup(1);
defaultServlet.setOverridable(true);
context.addChild(defaultServlet);
context.addServletMapping("/","default");
}
private void stopServerActivator() { private void stopServerActivator() {

Loading…
Cancel
Save