是什么导致java.lang.IllegalStateException:在tomcat / mod_jk中发布过大 [英] What causes java.lang.IllegalStateException: Post too large in tomcat / mod_jk

查看:191
本文介绍了是什么导致java.lang.IllegalStateException:在tomcat / mod_jk中发布过大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要调整哪些配置,以及它的位置,以增加允许的最大帖子大小?

what configuration needs to be tweaked, and where does it live, in order to increase the maximum allowed post size?

推荐答案

默认情况下,Apache Tomcat会对其接受的HTTP POST请求的最大大小设置限制。在Tomcat 5中,此限制设置为2 MB。当您尝试上载大于2 MB的文件时,可能会发生此错误。

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.

解决方案是通过增加限制来重新配置Tomcat以接受更大的POST请求,或者通过禁用它。这可以通过编辑[TOMCAT_DIR] /conf/server.xml来完成。将HTTPConnector的Tomcat配置参数maxPostSize设置为更大的值(以字节为单位)以增加限制。将其设置为0将禁用大小检查。有关详细信息,请参阅 Tomcat配置参考

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.

这篇关于是什么导致java.lang.IllegalStateException:在tomcat / mod_jk中发布过大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆