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. js jquery 扩展方法

    //扩展Array,增加IsInAyyay函数.函数功能:判断数组是否包含某元素 Array.prototype.IsInAyyay=function(e) { for (var i=0;i<t ...

  2. 解决Ubuntu下 Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)

    Ubuntu下CMake 编译时出现问题:Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) 查找发现  # sudo apt-g ...

  3. JSF 抽象和实现例子 (函数和属性)

    ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/ ...

  4. OpenSSL命令---passwd

    NAME passwd - compute password hashes SYNOPSIS openssl passwd [-crypt] [-1] [-apr1] [-salt string] [ ...

  5. dojo 加载Json数据

    1.今天研究了dojo datagrid加载WebService后台传上来的数据.研究来研究去发现他不是很难.用谷歌多调试一下就好了. 2.看很多例子,这个例子能够更好的帮我解决问题:https:// ...

  6. 小甲鱼python视频第十讲(课后习题)

    1.list1[0]与list1[0:1]的区别 2.分片的步长 3关于列表的copy(注意list2与list3的区别) list1 = [,,,,,,] list2 = list1[:] list ...

  7. LeetCode(四)

    Find Kth Largest Number public class Solution { public int findKthLargest(int[] nums, int k) { retur ...

  8. 彻底卸载sublime txt

    最近彻底重装系统之后,安装sublime txt3, 自己设置了一些,总是觉得不是很对劲,想重新安装. 结果每次安装之后,总是有一些配置文件和卸载之前的是一样的,重复几次总是如此,于是网上搜资料,怎么 ...

  9. Windows2003 II6.0 FTP 开了防火墙 FTP不能正常工作的解决办法

    .在防火墙设置的“高级-本地连接-设置”中把FTP的勾选

  10. Oracle每天自学一点点 常用Oracle

    创建表空间:create tablespace crmtb datafile 'F:\Oracle\oradata\crmtb.dbf' size 100M;删除表空间:DROP TABLESPACE ...