post大小限制问题

今天在做post方式文件上传的的时候,大于5M的文件怎么也传不上去,分析了几个地方,最后发现原来是tomcat容器的限制,post的最大值有限制,修改为maxPostSize =-1


As per http://tomcat.apache.org/tomcat-6.0-doc/config/http.html the default is 2 MB for your<Connector>.

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).

Edit Tomcat's server.xml. In the <Connector> element, add an attribute maxPostSize and set a larger value (in bytes) to increase the limit.

Having said that, if this is the issue, you should have got an exception on the lines of Post data too big in tomcat

See here http://stackoverflow.com/questions/123335/what-causes-java-lang-illegalstateexception-post-too-large-in-tomcat-mod-jk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值