当使用form表单的post方式提交键值对数据超过10000时,tomcat服务器会有默认只提交10000对键值对,多余的就会舍去。
在这里我使用的是tomcat8,查看tomcat8文档如下网址:
tomcat8相关文档
发现Attributes中有参数maxParameterCount的介绍:
The maximum number of parameter and value pairs (GET plus POST) which will be automatically parsed by the container. Parameter and value pairs beyond this limit will be ignored. A value of less than 0 means no limit. If not specified, a default of 10000 is used. Note that FailedRequestFilter filter can be used to reject requests that hit the limit.
大意就是说该参数表示容器自动解析值对的最大数量,超出这个数的值对将会被忽略,默认值为10000。如果设置小于0,则无限制。
于是在server.xml找到8080端口的connector中加入maxParameterCount=“-1”就可以。