what configuration needs to be tweaked, and where does it live, in order to increase the maximum allowed post size?
什么配置需要调整,以及它在哪里生活,以增加允许的最大邮政大小?
3 个解决方案
#1
21
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 2 MB. When you try to upload files larger than 2 MB, this error can occur.
默认情况下,Apache Tomcat会对其接受的HTTP POST请求的最大大小设置限制。在Tomcat 5中,此限制设置为2 MB。当您尝试上载大于2 MB的文件时,可能会发生此错误。
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_DIR]/conf/server.xml. Set the Tomcat configuration parameter maxPostSize for the HTTPConnector to a larger value (in bytes) to increase the limit. Setting it to 0 in will disable the size check. See the Tomcat Configuration Reference for more information.
解决方案是通过增加限制或禁用它来重新配置Tomcat以接受更大的POST请求。这可以通过编辑[TOMCAT_DIR] /conf/server.xml来完成。将HTTPConnector的Tomcat配置参数maxPostSize设置为更大的值(以字节为单位)以增加限制。将其设置为0将禁用大小检查。有关更多信息,请参阅Tomcat配置参考。
#2
4
It will be for others persons, I see you are coupling Apache HTTP and Tomcat (tomcat / mod_jk), in this case edit the Coyote/JK2 AJP 1.3 Connector the same way you do it for the standard connector (Coyote HTTP/1.1), because the AJP1.3 Connector is where Tomcat receive data.
这将是其他人,我看到你正在耦合Apache HTTP和Tomcat(tomcat / mod_jk),在这种情况下编辑Coyote / JK2 AJP 1.3连接器的方式与标准连接器(Coyote HTTP / 1.1)相同,因为AJP1.3连接器是Tomcat接收数据的地方。
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" maxPostSize="0"/>
#3
0
The root cause of IllegalStateException exception is a java servlet is attempting to write to the output stream after the response has been committed.
IllegalStateException异常的根本原因是java servlet在提交响应后尝试写入输出流。
Take care that no content is added to the response after redirecting/dispatching request.
注意重定向/分派请求后没有内容添加到响应中。
#1
21
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 2 MB. When you try to upload files larger than 2 MB, this error can occur.
默认情况下,Apache Tomcat会对其接受的HTTP POST请求的最大大小设置限制。在Tomcat 5中,此限制设置为2 MB。当您尝试上载大于2 MB的文件时,可能会发生此错误。
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_DIR]/conf/server.xml. Set the Tomcat configuration parameter maxPostSize for the HTTPConnector to a larger value (in bytes) to increase the limit. Setting it to 0 in will disable the size check. See the Tomcat Configuration Reference for more information.
解决方案是通过增加限制或禁用它来重新配置Tomcat以接受更大的POST请求。这可以通过编辑[TOMCAT_DIR] /conf/server.xml来完成。将HTTPConnector的Tomcat配置参数maxPostSize设置为更大的值(以字节为单位)以增加限制。将其设置为0将禁用大小检查。有关更多信息,请参阅Tomcat配置参考。
#2
4
It will be for others persons, I see you are coupling Apache HTTP and Tomcat (tomcat / mod_jk), in this case edit the Coyote/JK2 AJP 1.3 Connector the same way you do it for the standard connector (Coyote HTTP/1.1), because the AJP1.3 Connector is where Tomcat receive data.
这将是其他人,我看到你正在耦合Apache HTTP和Tomcat(tomcat / mod_jk),在这种情况下编辑Coyote / JK2 AJP 1.3连接器的方式与标准连接器(Coyote HTTP / 1.1)相同,因为AJP1.3连接器是Tomcat接收数据的地方。
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" maxPostSize="0"/>
#3
0
The root cause of IllegalStateException exception is a java servlet is attempting to write to the output stream after the response has been committed.
IllegalStateException异常的根本原因是java servlet在提交响应后尝试写入输出流。
Take care that no content is added to the response after redirecting/dispatching request.
注意重定向/分派请求后没有内容添加到响应中。