post提交数据参数量过大问题

来源:互联网 发布:尔雅网络课程密码 编辑:程序博客网 时间:2024/06/05 07:16
使用jboss7.1在页面以post方式提交数据,报如下错误:
[java] view plain cop
  1. ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[action]] (http--0.0.0.0-8545-8) 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 ([512]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
  2. ....

错误的原因是请求参数超过了最大请求参数数量,需要修改maxParameterCount配置。只需要在jboss7.1的standalone.xml文件中增加一个配置即可

[html] view plain copy
  1. <system-properties>  
  2.        <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>  
  3.        <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>  
  4.     <!-- 最大请求参数数量配置-->  
  5.        <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>  
  6.    </system-properties>  

即增加:

[html] view plain copy
  1. <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>  

原文解答地址:https://developer.jboss.org/thread/177942?_sscc=t
阅读全文
0 0
原创粉丝点击