THE Post request method is too long, resulting in the parameter being null and the post being too long.

Source: Internet
Author: User

THE Post request method is too long, resulting in the parameter being null and the post being too long.

The Post submission method has no restrictions on the parameter length and HTTP protocol.

However, when I was working on a web project today, I encountered a problem. When the content of the form to be submitted reached a certain hour, I found that the parameter received by the background code was blank.

After a query, I found that the application server has a limit on the length of the Request Parameters. I did not test the specific limit.

I use Tomcat. The solution is as follows:

<Connector port = "8080" protocol = "HTTP/1.1" maxThreads = "150" connectionTimeout = "20000" redirectPort = "8443"/>
Add a property: maxPostSize = "0", which means tomcat does not limit the length of request parameters.


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.