如何通过Spark 框架配置 Jetty 选项?
当我提交大表格时,我遇到了以下问题。Jetty 的解决方案记录在Form too Large Exception
但是使用 Spark 框架对我隐藏了 Jetty,我将如何配置来解决这个问题。
org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
at org.eclipse.jetty.server.Request.getParameters(Request.java:373)
at org.eclipse.jetty.server.Request.getParameter(Request.java:1016)
at javax.servlet.ServletRequestWrapper.getParameter(ServletRequestWrapper.java:194)
at spark.Request.queryParams(Request.java:283)
at spark.http.matching.RequestWrapper.queryParams(RequestWrapper.java:141)
at com.jthink.songkong.server.callback.ServerEditSongs.startTask(ServerEditSongs.java:45)
at com.jthink.songkong.server.CmdRemote.lambda$null$62(CmdRemote.java:171)
at spark.RouteImpl$1.handle(RouteImpl.java:72)
at spark.http.matching.Routes.execute(Routes.java:61)
at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)
at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:59
1)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Form too large: 273433 > 200000
at org.eclipse.jetty.server.Request.extractFormParameters(Request.java:516)
at org.eclipse.jetty.server.Request.extractContentParameters(Request.java:454)
at org.eclipse.jetty.server.Request.getParameters(Request.java:369)
... 26 more