Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法:

把spring日志级别调整到debug级别,可以看到更多的前端请求后台的日志,可以更精确的定位到底哪里出错了。

log4j.properties添加一行:

log4j.logger.org.springframework=DEBUG  

看到console控制台日志:日期转换异常。一般是你前端的页面的日期传到后台,格式转换异常。需要你重新设置下日期格式,前后端要对应。

解决方法:Controller层加入转换方法

   /*
* 解决createTime格式转换问题Date to String
*/
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
}

参考文献:http://blog.csdn.net/yiluoak_47/article/details/10821747

"The request sent by the client was syntactically incorrect ()"问题定位及解决:的更多相关文章

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

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

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

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

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

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

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

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

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

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

  6. HTTP Status 400 - description 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 ...

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

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

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

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

    http://www.cnblogs.com/xiandedanteng/p/4168609.html 这个错误是SpringMVC报出来的,见到它意味着html/jsp页面的控件名称 和 contr ...

随机推荐

  1. bzoj 1604 [Usaco2008 Open]Cow Neighborhoods 奶牛的邻居(set+并查集)

    Description 了解奶牛们的人都知道,奶牛喜欢成群结队.观察约翰的N(1≤N≤100000)只奶牛,你会发现她们已经结成了几个“群”.每只奶牛在吃草的 时候有一个独一无二的位置坐标Xi,Yi( ...

  2. map/reduce实现数据去重

    import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.co ...

  3. HW4.27

    public class Solution { public static void main(String[] args) { int count = 0; for(int i = 2001; i ...

  4. 蔡勒(Zeller)公式

    蔡勒(Zeller)公式,是一个计算星期的公式,随便给一个日期,就能用这个公式推算出是星期几. W =[ [c/4] - 2c + y + [y/4] + [13 * (m+1) / 5] + d - ...

  5. InetAddress Example program in Java

    The InetAddress class has no visible constructors. To create an InetAddress object, you have to use ...

  6. 极客技术专题【007期】:jQuery初学者入门 - jQuery Event

    日期:2013-8-19  来源:GBin1.com 技术专题介绍 专题:jQuery初学者入门[第三讲:jQuery Event] 分享人:极客标签技术编辑 -Lana (请站内关注分享人) 授课时 ...

  7. ARCGIS 点抽稀的实现

    点抽稀是制图综合的一部分,即在点数据点特别密集是,需要选取比较重要的点而舍去不要重的点,使得图面整洁. 一.基本原理 先把所有的点符号都设成透明.这样显示是没有点的.然后给这些点设置标注.标注方法很奇 ...

  8. Maven : 将Jar安装到本地仓库和Jar上传到私服 转

    http://blog.csdn.net/we_shell/article/details/49819221 Jar的maven配置 <dependency><groupId> ...

  9. Android开发艺术探索(三)——View的事件体系

    一.View基础知识 主要介绍内容有:View的位置参数.MotionEvent和TouchSlope对象.VelocityTracker.GestureDetector和Scroller对象 1.什 ...

  10. 改变JVM中的参数以提高Eclipse的运行速度

    首先建立评估体系,将workspace里所有的项目close掉,关闭eclipse.优化的用例就是启动eclipse,open一个项目,eclipse会自动build这个项目,保证没有感觉到明显的卡, ...