SpringMVC error 400 about ajax submission (obtain in the background as null), springmvcajax

Source: Internet
Author: User

SpringMVC error 400 about ajax submission (obtain in the background as null), springmvcajax

 

There are three possible 400 errors

1: The request data volume is too large, but this situation is generally rare.

2: The request url is incorrect. Check whether the url is correct.

3: The request data parameter is incorrect. Make sure that each parameter can be requested.

Note: In the past, the error 400 was reported. If the backend parameter is null, the error is due to the third case. After parameter troubleshooting (the method is a bit stupid). It turns out that an error occurred while obtaining the 'time' parameter.

If there are comrades in the same situation as me, you try to remove the "time" parameter, get it, or convert the obtained js object to a date object in js for request.

 

JS:

HTML:

 

Ajax:

 

 

Solution: convert an object to a date object

The background will be able to see

The object has been caught, and how can we get it with you. Hey

 

 

Copyright Disclaimer: This article is an original article without code and cannot be reproduced without permission.

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.