Spring MVC error: The request sent by the client is syntactically incorrect () __spring

Source: Internet
Author: User

SPRINGMVC data binding is a good thing, in the data binding must be the idea of the Controller method in the parameter name and JSP page in the name of the parameters are consistent or in accordance with the binding specifications to write, if not consistent, you may report the following error:
The request sent by the client is syntactically incorrect (). The literal understanding is that the requests sent by clients are syntactically incorrect. The reality is that SPRINGMVC cannot implement data binding.
Give an example to illustrate:

Public String Saveorder (string[] itemids, @RequestParam ("level") string[] levels, Modelmap Modelmap)

This itemids must be the same as the name of the parameter in the JSP page; If you want to name the same as the levels's way of writing through the @requestparam, where the level in parentheses is the parameter name in the JSP page, Levels is the name to be used in the Controller method, and if no itemids and level parameters are available in the JSP page, the same error is reported because SPRINGMVC cannot implement the binding of the data.

Spring MVC error: The request sent by the client is syntactically incorrect ()

<form method= "POST" action= "${ctx}/storaget/save" class= "Pageform" Required-validate "return Validatecallback (this, dialogajaxdone) ">

Change---->

<form method= "POST" action= "${ctx}/storaget/save" enctype= "Multipart/form-data" class= "PageForm" Required-validate "onsubmit=" return Iframecallback (this, dialogajaxdone); ">

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.