tomcat max post size

Today I encountered some error when trying to post a xml whose size is about 3MB to the server from gwt client. Turns out the reason is from tomcat.


Apache Tomcat , by default, sets the maximum size of acceptable HTTP POST request to 2MB.

You can reconfigure Tomcat to accept larger requests. This can be done by increasing the allowable limit or just simply disabling this functionality.
The file you need to edit is <Tomcat-Dir>/server.xml. In the <Connector> element, add an attribute maxPostSize and set a larger value (in bytes) to increase the limit.
to increase the limit. Setting it to 0 will disable the size check.

See the Tomcat Configuration Reference for more information.

maxPostSize – “The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The feature can be disabled by setting this attribute
to a value inferior or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).”


One comment

  1. vince delmonte fitness program · September 5, 2014

    Hello I am so glad I found your weblog, I really found you by accident, while I was browsing on Bing for
    something else, Anyways I am here now and would just like to
    say kudos for a marvelous post and a all round interesting blog (I also love the theme/design), I don’t have time
    to look over it all at the moment but I have saved it and also
    added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the great

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s