In general development, the Jetty plugin is used, but when the submitted form is too large, errors will occur.
Development environment:
eclipse Neon. 1a Release (4.6.1)
jetty-maven-plugin 8.1.16.v20140903
maven 3.3.9
Error message:
< p>java.lang.IllegalStateExeption: Form too large 887499>200000
at org.eclipse.jetty.server.Request.extractParameters(Request.jav:352)
Reason:< /p>
The request.getParameter method of jetty has a limitation on the data length. The default is 200000Byte, and an exception will occur if it exceeds 200000Byte.
Solution:
Find the answer on the Internet:
可以通过设置JVM参数来修改这个限制:
Jetty7:org.eclipse.jetty.server.Request.maxFormContentSize=-1
Jetty6:org.mortbay .jetty.Request.maxFormContentSize=-1
You can also add the following code in jetty.xml:
jetty9: (same as jetty8, not tested)
Jetty8: (According to the author, jetty9 can be used, which is inconsistent with the official jetty-web-xml, but it can be tested personally)
"http://jetty.mortbay.org/configure.dtd">
0
Jetty7: (not tested)
org.eclipse.jetty.server.Request.maxFormContentSize
-1
Jetty6: (not tested)
org.mortbay.jetty .Request.maxFormContentSize
-1
jetty-web-xml-examples: (For details, refer to the reference below Sample URL)
Thank them for sharing!!!
Reference URL:
http: //blog.csdn.net/madding/article/details/6759603
http://www.fengfly.com/plus/view-214026-1.html
http: //blog.csdn.net/yunhengyin/article/details/52127255 (jetty9 )
http://blog.csdn.net/lj_6891zz/article/details/40341951 (manual modification)
http://www.eclipse.org/jetty/documentation/ current/jetty-web-xml-config.html