Error the request sent by the client was syntactically incorrect () resolution

Source: Internet
Author: User

The error is SPRINGMVC, and seeing it means that the control name of the html/jsp page does not match the parameters of the function in the controller.

Like there's a form on the interface.

    <formname= "Form1"Action= "uploaddocument.html"Method= "POST"ENCTYPE= "Multipart/form-data">    <Divclass= "form" >            <P>                <spanclass= "req"><inputID= "Remarktxt"name= "remarktxt"class= "Field size4"title= "Enter the date" /></span>                <label>Remark:<span>(The brief introduction of the file)</span></label>            </P>                        <P>                <spanclass= "req"><inputtype= "File"name= "Uploadfilectrl"class= "Field size4"title= "Choose the file" /></span>                <label>Upload file:<span>(Click browse to choose)</span></label>            </P>    </Div>        <Divclass= "Buttons">        <inputID= "Querybtn"type= "button"class= "button"value= "Submit" />    </Div>        </form>

The corresponding function parameters should be written like this:

@RequestMapping (value= "/uploaddocument")    public String uploaddocument (@RequestParam ( "  Remarktxt") String remark,                                   @RequestParam ("Uploadfilectrl") multipartfile file,
HttpServletRequest request,
HttpServletResponse response) {
....
}
}

Note the one by one correspondence between the above bold characters.

Error the request sent by the client was syntactically incorrect () resolution

Related Article

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.