Jfinal + jetty 8 出现 form too large问题

Posted 一只西瓜

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jfinal + jetty 8 出现 form too large问题相关的知识,希望对你有一定的参考价值。

// JFinal修改Jetty MaxFormContentSize参数
if (JFinal.me().getServletContext().getClass().getName().equals("org.eclipse.jetty.webapp.WebAppContext$Context")) {
try {
ServletContext ctx = JFinal.me().getServletContext();
Method getContextHandler = ctx.getClass().getMethod("getContextHandler", null);
Object handler = getContextHandler.invoke(ctx, null);
Method setMax = handler.getClass().getMethod("setMaxFormContentSize", int.class);
setMax.invoke(handler, 1024 * 1024 * 100);
} catch (Exception e) {
e.printStackTrace();
}
}
放在afterJFinalStart()里

 

以上是关于Jfinal + jetty 8 出现 form too large问题的主要内容,如果未能解决你的问题,请参考以下文章