gpt4 book ai didi

java - 增加 Glassfish maxParameterCount

转载 作者:行者123 更新时间:2023-11-30 03:44:02 29 4
gpt4 key购买 nike

我正在使用 GlassFish 4 服务器开发一个基于 Web 的应用程序。今天我遇到了以下异常:

警告:GRIZZLY0173:检测到单个请求的请求参数数量(GET 加 POST)超过最大数量 ([10 000])。任何超出此限制的参数都将被忽略。要更改此限制,请在连接器上设置 maxParameterCount 属性。

这意味着当我向服务器发出发布请求时,我发送的参数超过了当前允许的最大请求参数,因此我必须增加该值。

任何人都知道如何在 GlassFish 4 的情况下进行配置。

附注我不想分解源文件并更改某些值。我想通过一些 xml 配置或通过服务器管理控制台来做到这一点。

最佳答案

在 GlassFish 4 中,您可以使用 asadmin 命令行实用程序更改设置 max-request-parameters:

asadmin set server.network-config.protocols.protocol.http-listener-1.http.max-request-parameters=10001

或者在domain.xml中手动:

    <protocols>
<protocol name="http-listener-1">
<http max-request-parameters="10001" max-connections="250"
default-virtual-server="server">
<file-cache></file-cache>
</http>
</protocol>
// more protocols...
<protocols>

如果参数 max-request-parameters 不存在,请添加该参数。确保使用正确的 http 监听器。

关于java - 增加 Glassfish maxParameterCount,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26195694/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com