tags:

views:

127

answers:

2

According to Tomcat docs:

The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).

But what's "the container FORM URL parameter parsing"? Any ideas what is the purpose of "maxPostSize"?

Thanks in advance.

A: 

It means that when you have something like:

<form type="post" ...>
    <input name="something" value="someVal" type="text"/>
</form>

in your HTML, if someVal is more than 2MB in size (say, a very long string), only the first 2MB of that data will be available when you do request.getAttribute("something") in your servlet.

ryanprayogo
or maybe, when you try to upload a file. See:http://www.websina.com/bugzero/faq/exception-tomcat-connector.html
ryanprayogo
+3  A: 

Its a set limit on where to stop parsing the POST. Just in case some hacker decides to start sending a request with POST data and just continuously sending POST data. Tomcat won't just take forever parsing POST. Having the limit prevents a denial of service attacks. (They keep doing this until your server maxes stops responding for whatever reason)

AlReece45
But what's a FORM URL? Do we ever have such a thing is a FORM URL? And what's "the container's FORM URL"?
Bytecode Ninja
Fixed a typo...
Bytecode Ninja
I'm not sure why that particular place says "FORM URL", in other the developer API, it has "Maximum size of a POST which will be automatically parsed by the container. 2MB by default."Where the container is essentially the running servlet. (it would be baesd off of their servlet class)
AlReece45