tomcat server配置post长度为不限制

maxPostSize="0"  tomcat post 的数据大小有限制  ,maxPostSize设置为0表示没有限制 用以上下代码覆盖掉上面的就可以了
<Connector   connectionTimeout = "20000"   port = "8080"   protocol = "HTTP/1.1"   redirectPort = "8443"    maxPostSize = "0" />   
   <!-- A "Connector" using the shared thread pool-->   
  <!--  
   <Connector   executor = "tomcatThreadPool"   
              port = "8080"   protocol = "HTTP/1.1"   
              connectionTimeout = "20000"   
              redirectPort = "8443"   maxPostSize = "0" />   


tomcat nginx默认的post大小限制
执行大文件上传,或者,大数据量提交时,当提交的数据大小超过一定限制时,发现后台从request取值的代码request.getParameter("message")返回值为null,原因是因为服务器对于提交的post请求的大小有一定的限制

tomcat:默认大小2097152,当maxPostSize=0时,不限制;maxPostSize=20971520时,为20M
nginx:默认的最大请求body大小为8m,修改设置client_max_body_size=100m;
resin:没有发现默认限制请求大小的地方!

tomcat:maxPostSize

The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).


Nginx的"413 request entiry too large"
tomcat返回400
tomcat请求端口都加上maxPostSize="0"
 
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值