Question related to Request parameters are dropped in Tomcat
Well… apparently, even simplest request as below on some servers lost the parameters and some it is OK.
@GET
@Path("/get-retrieve")
public String foo(){
return ""+httpServletRequest.getParameterMap().size();
}
so returned value is 0 (zero).
Update: the logged request by AccessLogValve contains the parameter
127.0.0.1 - - [26/Nov/2012:03:04:58 -0800] "POST /api/get-retrieve?x=y HTTP/1.1" 200 16
So, probably the problem is somewhere in the Tomcat throwing out those params…
I had this once, after a long investigation it turned out the problem was in the definition of the Connector in Tomcat’s server.xml :
<Connector connectionTimeout="20000" maxHttpHeaderSize="9000" maxParameterCount="100" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>Look at the definition of “maxParameterCount”, in our case it was set to 0 which caused all request parameters to be dropped.