您的位置:首页 > 编程语言 > Java开发

struts2中form表单使用post方式提交参数(键值对)超过10000的限制

2017-10-14 11:42 579 查看
当使用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”就可以。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐