1. 獲取參數Json的值爲null sql
String json=request.getParameter("Json");
首先檢查是否有下面的東東,apache
信息: Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
若是有:說明tomcat 的head緩衝區大小不夠,在server.xml中增長maxHttpHeaderSize字段:json
<Connector URIEncoding="UTF-8" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
useBodyEncodingForURI="false"
enableLookups="false"
connectionTimeout="20000"
redirectPort="8443" maxHttpHeaderSize="你想要的大小"/>
不過使用Web提交就不會出現這種問題,即便手機端再三強調使用的是Post方式,仍懷疑是由於使用的Get致使Header數據過長.tomcat
2. 更上面解決方案同樣 maxHttpHeaderSizeless
org.apache.coyote.http11.HeadersTooLargeException: An attempt was made to write more data to the response headers than there was room available in the buffer. Increase maxHttpHeaderSize on the connector or write less data into the response headers.