Luis Durazo Luis Durazo - 1 year ago 239
Java Question

Tomcat ignoring post parameters request

I have an Apache Tomcat server to read request from my webapp.

In my webapp I have a form that is submitted and posts a large number of POST parameters, around 8k~

However when I try to debug the entrypoint, where the HttpServletRequest, I always receive exactly 6841. The inputs from the form are created iterating over a number of elements, meaning that the last ones are exactly the same form as the other that are succeding

I can't show code for NDA reasons.
I discarded the frontend as an issue because with a sniffer I was able to see that the complete post param list is sent.

I believe I'm on the right track, I think Tomcat is dropping the other post params. the post size limit is well beyond the size of the request, and we don't have a post parameter count configured on server.xml (defaults to 10,000 and I don't hit that amount).

All answers I have found are about not sending parameters at all or errors being thrown, in this case they are simply ignored by Tomcat.

Answer Source

Increasing the number of POST parameters (not size of post) to 20,000 fixed the issue in my case. This was done in the tomcat server.xml configuration file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download