您的位置:首页 > 其它

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

2017-10-19 13:55 274 查看
使用jboss7.1在页面以post方式提交数据,报如下错误:

[java] view
plain cop

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.

....

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

[html] view
plain copy

<system-properties>  

       <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>  

       <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>  

    <!-- 最大请求参数数量配置-->  

       <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>  

   </system-properties>  

即增加:

[html] view
plain copy

<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="5000"/>  

原文解答地址:https://developer.jboss.org/thread/177942?_sscc=t
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐