java.lang.IllegalArgumentException: Request header is too large

ajax 提交时,默认采用的是 get提交方式,数据是放在头部的,数据量超过了限制,所以报错。

改成 post提交,将数据放到 body 中。解决问题。

其他解决方法:

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" maxHttpHeaderSize="65536" maxPostSize="4194304"  
               URIEncoding="UTF-8"/>


http://stackoverflow.com/questions/2472905/request-header-is-too-large


the proper solution is to add the following property under http-listener:

<property name="maxPostSize" value="xxxx" />
原文地址:https://www.cnblogs.com/digdeep/p/6388081.html