|
|
|
@ -62,6 +62,7 @@ public class FineEmbedServerActivator extends Activator {
|
|
|
|
|
tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort()); |
|
|
|
|
// 设置解码uri使用的字符编码
|
|
|
|
|
tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8); |
|
|
|
|
setMaxPostSize(); |
|
|
|
|
String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); |
|
|
|
|
|
|
|
|
|
//内置的上下文使用工程目录比如webroot
|
|
|
|
@ -79,6 +80,18 @@ public class FineEmbedServerActivator extends Activator {
|
|
|
|
|
context.addServletContainerInitializer(initializer, classes); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// tomcat的maxPostSize会影响到post参数获取,默认2M
|
|
|
|
|
private void setMaxPostSize() { |
|
|
|
|
|
|
|
|
|
if (System.getProperty("tomcat-maxPostSize") != null) { |
|
|
|
|
try { |
|
|
|
|
tomcat.getConnector().setMaxPostSize(Integer.parseInt(System.getProperty("tomcat-maxPostSize"))); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error("maxPostSize error: " + e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void stopServerActivator() { |
|
|
|
|
|
|
|
|
|