http://www.cnblogs.com/xiandedanteng/p/4168609.html

这个错误是SpringMVC报出来的,见到它意味着html/jsp页面的控件名称 和 controller里函数的参数不符。

好比界面有个这样的form

<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>

而对应的函数参数应该这样写:

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

错误The request sent by the client was syntactically incorrect ()的解决的更多相关文章

  1. 错误:The request sent by the client was syntactically incorrect的解决

    问题: 错误400-The request sent by the client was syntactically incorrect. springMVC中,某个页面提交时报400错误,如下图. ...

  2. SpringMVC---400错误The request sent by the client was syntactically incorrect ()

    在SpringMVC中使用@RequestBody和@ModelAttribute注解时遇到了很多问题,现记录下来. @ModelAttribute这个注解主要是将客户端请求的参数绑定参数到一个对象上 ...

  3. 错误400-The request sent by the client was syntactically incorrect

    springMVC中,某个页面提交时报400错误,如下图.     解决方法: 1.在网上找了一下,答案是通常遇到这个错误是因为前端jsp页面的控件名称和controller中接收的参数名称不一致.但 ...

  4. SpringMVC报错The request sent by the client was syntactically incorrect ()

    springmvc数据绑定出的错 在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写, 如果不一致,可能回报如下错误: The requ ...

  5. The request sent by the client was syntactically incorrect.

    HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...

  6. 又见The request sent by the client was syntactically incorrect ()

    前几天遇到过这个问题(Ref:http://www.cnblogs.com/xiandedanteng/p/4168609.html),问题在页面的组件name和和注解的@param名匹配不对,这个好 ...

  7. "The request sent by the client was syntactically incorrect ()"问题定位及解决:

    Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法: 把spring日志级 ...

  8. The request sent by the client was syntactically incorrect问题解决

    The request sent by the client was syntactically incorrect意思嘛,google翻译一下 通过日志不难看出,是由参数不匹配造成的. 所以对于Da ...

  9. spring mvc 在上传图片时,浏览器报The request sent by the client was syntactically incorrect

    项目中,在一个jsp页面里其它图片上传是功能是可以使用的,当我自己新加了一个图片上传时,提交表单后,浏览器报The request sent by the client was syntactical ...

随机推荐

  1. LinQ 高级查询

    高级查询 模糊查(包含):.Contains(name) 开头:.StartsWith(name) 结尾:.EndsWith(name) 个数:.Count() 最大值:Max(r => r.p ...

  2. cell的自适应

    +(CGFloat)getCellHeightWithItem:(FXOwnershipStrutureInfo *)item { if (item.rowH) {//如有rowH就直接返回,避免重新 ...

  3. nullcon HackIM 2016 -- Programming Question 1

    So you reached Delhi and now the noise in your head is not allowing you to think rationally. The Nos ...

  4. textarea 怎么固定大小,不让调整

    1:彻底禁用拖动(推荐) resize: none; 2:只是固定大小,右下角的拖动图标仍在 width: 200px; height: 100px; max-width: 200px; max-he ...

  5. php SPL常用接口

    在PHP中有好几个预定义的接口,比较常用的四个接口(Countable.ArrayAccess.Iterator.IteratorAggregate(聚合式aggregate迭代器Iterator)) ...

  6. SQL中的循环、for循环、游标

    我们使用SQL语句处理数据时,可能会碰到一些需要循环遍历某个表并对其进行相应的操作(添加.修改.删除),这时我们就需要用到咱们在编程中常常用的for或foreach,但是在SQL中写循环往往显得那么吃 ...

  7. mfc中Button、Edit Control和MFC EditBrowse Control的用法

    [前(fei)言(hua)] 写LL(1)分析器被CString转string卡了一个多小时也是醉了. 趁着还算清醒写下这次用到的控件的使用方法好了. 这次实验的mfc用到了四个控件:Edit Con ...

  8. 剑指offer题目1-10

    面试题3:二维数组中的查找 public class Solution { public boolean Find(int [][] array,int target) { boolean isFou ...

  9. 2015年九月八日---js学习总结

    参考书:javaScript Dom 编程的艺术 知识小结:一:js简史:前称ECMAScript 是一种脚本语言通常只能通过浏览器进行解释和执行. Dom(文档对象模型):是一套对文档的内容进行抽象 ...

  10. [MOSEK] Mosek求解中遇到的奇葩内存问题

    在使用mosek优化库的时候,使用http://docs.mosek.com/7.0/capi/MSK_getxx_.html的 MSKrescodee MSK_getxx ( MSKtask_t t ...