Spring MVC "The request sent by the client was syntactically incorrect "解决办法
来源:互联网 发布:js中indexof的用法 编辑:程序博客网 时间:2024/05/21 22:42
The request sent by the client was syntactically incorrect 说的意思是:由客户端发送的请求是语法上是不正确的。但还是不明白哪里出了问题,
我的URL:http://localhost:8080/memo/test/school/insertKlass.html ,真看不出那个参数出错了,实在没办法我把spring日志级别调整到debug级别,终于找出原因了:
[20131017 20:42:31.218-DEBUG] Resolving exception from handler [com.memo.test.school.handler.KlassHandler@3ca41c]: org.spring.framework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'klass' on field 'grade': rejected value [DD]; codes [typeMismatch.klass.grade,typeMismatch.grade,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes
[klass.grade,grade]; arguments []; default message [grade]]; default message [Failed to convert property value of type 'java
.lang.String' to required type 'java.lang.Integer' for property 'grade'; nested exception is java.lang.NumberFormatException:
For input string: "DD"] org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(132)
原来,Klass类里的属性grade,我定义的是Integer,但在页面上输入的是字符DD,因此由于参数格式错误,服务器才会报出HTTP 400的错误代码。
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect "解决办法
- Spring MVC "The request sent by the client was syntactically incorrect "解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法 .
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- The request sent by the client was syntactically incorrect ()"解决办法
- The request sent by the client was syntactically incorrect解决办法
- The request sent by the client was syntactically incorrect - Spring mvc
- 异常处理Spring MVC "The request sent by the client was syntactically incorrect ()"
- Spring MVC报错:The request sent by the client was syntactically incorrect ()
- spring mvc 400,The request sent by the client was syntactically incorrect的问题
- Spring MVC报错:The request sent by the client was syntactically incorrect ()
- spring MVC 错误The request sent by the client was syntactically incorrect ()的解决
- 韦东山Linux视频第1期 ARM裸板驱动 学习笔记索引
- QuartZ Cron表达式
- 【教程】在Eclipse中使用PyDev进行Python开发
- Android之Handler用法总结
- IIS7上进行URL重写(Windows主机)
- Spring MVC "The request sent by the client was syntactically incorrect "解决办法
- 练习 十六进制转八进制
- Spring JdbcTemplate实现通用的泛型dao一:主功能实现
- 硬币面值组合的算法题解
- CV与IP:基础,经典以及最近发展
- 附近的鬼地方
- 计算机视觉资源汇总 - Part I
- hdu1698 Just a Hook(线段树)
- C语言字符输出格式化