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

当使用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”就可以。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值