在Connector 节点中加入maxPostSize="0"就可以了,当maxPostSize=20971520时,为20M,所以单位是M。
1、介绍:tomcat7设置server.xml中connector
2、标签 maxPostSize="0" post
3、请求为不限制大小换个tomcat8以后发现报错,然后设置为具体值解决,tomcat:
4、默认大小2097152,当maxPostSize=0时,不限制;
5、maxPostSize=20971520时,为20M
6、你用ajax上传的吧,maxPostSize 不能限制。