我们已经将jboss升级到wildfly,在旧版本中我们遇到了这样的问题post中传递的最大参数个数 https://stackoverflow.com/questions/12277231/maximum-number-of-parameter-passed-in-a-post.
在旧版本的 jboss 中,我们收到此错误消息
2015-02-10 20:04:34,582 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sf].[action]] (http--
127.0.0.1-8080-38) Servlet.service() for servlet action threw exception: java.lang.IllegalStateException: More than the
maximum number of request parameters (GET plus POST) for a single request ([5,000]) were detected. Any parameters beyond
this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
at org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:199) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:382) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.parseParameters(Request.java:2874) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.getParameterNames(Request.java:1333) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.RequestFacade.getParameterNames(RequestFacade.java:379) [jbossweb-7.0.13.Final.jar:]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1225) [struts.jar:1.1]
现在为了验证这个问题,我们想知道 http 参数 MAX_COUNT 的默认值是多少。
在谷歌搜索上,我发现这个讨论没有提供太多关于如何修复它的信息http://lists.jboss.org/pipermail/undertow-dev/2013-April/000287.html http://lists.jboss.org/pipermail/undertow-dev/2013-April/000287.html
最大参数计数的默认值为“1000",如果你想修改它
在 Wildfly 中,我们必须在 http-listener 中使用“max-parameters”属性。
<http-listener name="default" socket-binding="http" max-parameters="10000"/>
有关文档,请参阅here http://wildscribe.github.io/Wildfly/8.2.0.Final/subsystem/undertow/server/http-listener/index.html
在 7.x 版本中,您可以通过以下更改来修复
org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000
对于旧版本的 jboss 最大参数计数讨论here https://stackoverflow.com/questions/12277231/maximum-number-of-parameter-passed-in-a-post
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)