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).”