vicker313 tech blog

August 12, 2010

Increase or Make Unlimited Maximum Post Size in Tomcat

Filed under: Tomcat — Tags: , , — vicker313 @ 7:58 pm

Tomcat by default has limited the amount of data (2 MB) that you can submit to Tomcat Service through Form Post Method. In other word, exception will occur if you upload something more than 2 MB. To increase the maximum post size or make it unlimited, you only need to:

  1. Edit the server.xml file in conf folder
  2. Look for the line (or similar):
    <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>
  3. Add this attribute: maxPostSize=”o”. Set the value 0 (zero) make it unlimited, or any size like “4MB”. Now it is look like this:
    <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxPostSize="0"/>
  4. Restart Tomcat Service and done


  1. Thank you very much!

    Comment by Josué — July 19, 2012 @ 6:29 pm

  2. it should be ‘0’ not ‘o’

    Comment by Ram — November 19, 2015 @ 3:12 am

    • thanks for the reply

      Comment by vicker313 — November 19, 2015 @ 8:23 am

RSS feed for comments on this post. TrackBack URI

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

Blog at

%d bloggers like this: