title: Limiting the size of JSON post request in Tomcat 8
body: <p>I have tried to limit the post request size of api by setting <strong>maxpostsize</strong> in /conf/server.xml, but its not working,</p>
  
  <p>Is there is any way to limit the size of json request in Tomcat?</p>
  
  <p>this is my server.xml connector config</p>
  
  <pre><code>&lt;Connector port="8080" protocol="HTTP/1.1" 
                 connectionTimeout="20000" 
                 redirectPort="8443" 
                 maxPostSize="30000" /&gt;
  </code></pre>
  
  <p>Thanks in advance</p>