日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

错误The request sent by the client was syntactically incorrect ()的解决

發(fā)布時(shí)間:2025/3/8 编程问答 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 错误The request sent by the client was syntactically incorrect ()的解决 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>

這個(gè)錯(cuò)誤是SpringMVC報(bào)出來(lái)的,見到它意味著html/jsp頁(yè)面的控件名稱 和 controller里函數(shù)的參數(shù)不符。

<form name="form1" action="uploadDocument.html" method="post" ENCTYPE="multipart/form-data"><div class="form" ><p><span class="req"><input id="remarkTxt" name="remarkTxt" class="field size4" title="Enter the date" /></span><label>Remark: <span>(The brief introduction of the file)</span></label></p><p><span class="req"><input type="file" name="uploadFileCtrl" class="field size4" title="Choose the file" /></span><label>Upload file: <span>(Click browse to choose)</span></label></p></div><div class="buttons"><input id="queryBtn" type="button" class="button" value="Submit" /></div></form>

?

而對(duì)應(yīng)的函數(shù)參數(shù)應(yīng)該這樣寫:

?

@RequestMapping(value="/uploadDocument")public String uploadDocument( @RequestParam("remarkTxt") String remark, @RequestParam("uploadFileCtrl") MultipartFile file,HttpServletRequest request,HttpServletResponse response){....} }

?

? 以后碰到這條錯(cuò)誤信息時(shí),首先應(yīng)檢查從客戶端提交的數(shù)據(jù)是否與Controller 處理方法接收的參數(shù)類型一致,換句話說(shuō),POST的數(shù)據(jù)結(jié)構(gòu)類型應(yīng)和接收時(shí)進(jìn)行類型匹配自動(dòng)轉(zhuǎn)換的數(shù)據(jù)類型要一致。

轉(zhuǎn)載于:https://my.oschina.net/u/3503268/blog/2249175

與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的错误The request sent by the client was syntactically incorrect ()的解决的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。