Ajax Post parameters background not getting the problem

Source: Internet
Author: User

The AJAX post parameter background gets no query parameters.

On the internet to find a variety of methods, including setting the Content-type, but also the JSON into a JSON format string, the problem still exists, but the post to get and can be obtained, baffled solution.

Later see TOMCAT7 configuration, the maxpostsize= "0" configuration removed when the problem disappears.

According to previous experience, maxpostsize= "0" is not limited to the size of the post data, how to limit the size of the data?

Because the project has to post a data to the background to save (size may be greater than 2M), so this size can not be limited.

The maxpostsize change was later found in the official Tomcat document.

tomcat6.0 's documentation says maxpostsize unrestricted setting is less than or equal to 0

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

tomcat7.0 's documentation says Maxpostsize Unlimited settings are less than 0

Exact words: The maximum size in bytes of the POST which would be a handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than zero. If not specified, the This attribute are set to 2097152 (2 megabytes). Note that the FailedRequestFilter can is used to reject requests it exceed this limit.

So set the Maxpostsize to "-1" and the problem is solved.

Ajax Post parameters background not getting the problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.