Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum number of parameter passed in a post

Tags:

html

jboss

I get this error:

Exception during request processing:
Caused by javax.servlet.ServletException with message:
"Parameter count exceeded allowed maximum: 512"

There seems to be a limit on the number of parameter passed in a post.

How could I extend this limit in JBoss?

like image 601
Giant2 Avatar asked Sep 05 '12 08:09

Giant2


3 Answers

The number of parameters was limited in all web servers to plug the hashmap collision denial of service attack.

You can raise the limit by adding the following system property to the configuration file (e.g. standalone.xml):

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

(source)

like image 177
Aaron Digulla Avatar answered Oct 09 '22 12:10

Aaron Digulla


Just in case : for a plain Tomcat the corresponding solution is to add :

org.apache.tomcat.util.http.Parameters.MAX_COUNT=10000

in catalina.properties

like image 37
bwt Avatar answered Oct 09 '22 12:10

bwt


Yes, it is right! Mr Aaron Digulla had right answer!
But please attention that: in Jboss 7, please insert the line

<system-properties>
<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT"value="10000"/> </system-properties>

right after the <extensions> tag, if not Jboss 7 will through error when parse standalone.xml, let me example:

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.2">
<extensions>
    <extension module="org.jboss.as.clustering.infinispan"/>
    <extension module="org.jboss.as.configadmin"/>
    ...
</extensions>
<system-properties>
    <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="10000" />
</system-properties>
like image 5
Trong-Hieu Tran Avatar answered Oct 09 '22 11:10

Trong-Hieu Tran