通过excel导入数据时tomcat5.5.20报了一个错Post too large

上网搜索原因如下:

Q: In Tomcat, I got a "Post data too big" error.

 

A: Apache Tomcat by default sets a limit on the maximum size of HTTP POST requests it accepts.

In Tomcat 5, this limit is set to 2097152 (2 Mb).

When you try to upload files or post forms that are larger than 2 MB, this error can occur.

 

The solution is to reconfigure Tomcat to accept larger POST requests, either by increasing

the limit, or by disabling it.

This can be done by editing Tomcat's server.xml.

In the element, add an attribute "maxPostSize" and set a larger value (in bytes) to increase the limit.

Setting it to 0 will disable the size check.

 

解决的办法是修改 tomcat 的配置文件 $TOMCAT_HOME$/conf/server.xml,找到里面的Connector标签,在该标签中添加 "maxPostSize" 属性,将该属性值设置成你想要的最大值,单位是字节,如果你把这个值设置为 0(maxPostSize="0"),tomcat 将不再检查 POST 的大小

如下

<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="5" port="8080" redirectPort="8443" maxPostSize="0"/>

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值