Tuesday, April 14, 2015

How to increase POST DATA SIZE Limit in JBoss and Tomcat.


If you are facing problem as your form is very big or it is merged with large size data, In this case, you might see HTTP 500 error on form submission. If you inspect the server logs, you will see this exception – “Template is not specified”.
On jboss/tomcat server, POST size limit is 2MB default. You can increase the POST size limit.
  • Go to <jboss_dir>/server/<server_name>/deploy/jbossweb.sar directory and look for server.xml and for the tomcat go to /<tomcat_dir>/conf/server.xml.
  • There is a <Connector> specified for “HTTP/1.1″ protocol like this
<Connector protocol=”HTTP/1.1″ port=”8080″ ….>
  • Add an attribute “maxPostSize” to this if not already added. Specify its value as per the requirement. ‘0’ means there is no limit on POST size.
After changing the settings, just restart the server to affect these changes.

No comments:

Post a Comment