Glassfish的5错误:GRIZZLY0205帖子太大

问题描述:

GF5 build1中,Java的EE7 + Primefaces 6.1,试图P中上传照片〜2MB:文本编辑componnent我总是得到错误:Glassfish的5错误:GRIZZLY0205帖子太大

严重:java.lang.IllegalStateException:GRIZZLY0205:帖子太大

在配置中将“Max Post Size”设置为-1或任何> 1mljn值 - server config - Network Config - 网络监听器 - http-listener-1没有帮助。 GF 4.1上相同

这是一个x-www-form-url编码的内容,所以我们需要设置参数:max- 表格 -post-size。这不是通过UI公开的,但您可以使用cmd配置它:

asadmin set configs.config.server-config.network-config.protocols.protocol.http-listener-1.http.max-form -post-size-bytes = -1