The request sent by the client was syntactically incorrect ()
来源:互联网 发布:手机服务器域名 编辑:程序博客网 时间:2024/06/06 05:51
在练手的一个ssm项目中,首次遇到这个错误。上网查了资料发现这是SpringMvc的问题。都说原因是jsp页面中标签的参数和controller中方法的参数不匹配造成的。但是我反复对了几遍实体类和jsp页面中标签的name属性,都是对应的,并没有错误.
然后又换了一种方法 加入了log4j日志工具,将日志级别改成了最低的debug级别,但是测试log4j都没有报出错误信息,所以还是没找出原因。最后在测试时发现应该是在日期转换中出了问题。jsp页面中 日期的数据传不到controller的方法中.于是在网上找到了这段代码,将其将入controller中,
@initBinderpublic void initBinder(WebDataBinder binder, WebRequest request) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); binder.registerCustomEditor(Date.class, new CustomDateEditor(df, true)); binder.registerCustomEditor(Timestamp.class, new CustomDateEditor(df, true)); }
但是还是有问题。在增加数据时,一定要将所有关于的时间数据都填好,否则还是会报上面一样的错误。
问题还在解决中,先暂时记录一下,等找到解决的方法,再更新文章.
0 0
- 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
- 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.
- 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.
- 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 ()
- The request sent by the client was syntactically incorrect解决
- The request sent by the client was syntactically incorrect ().(404)
- 【深度学习论文笔记:Recognition】:Deep Neural Networks for Object Detection
- Leetcode 382. Linked List Random Node 以及 水塘抽样算法
- android沉浸式状态栏、fitsSystemWindows、标题栏折叠
- 十二,ES6 新增Proxy代理
- Android之activity的数据持久化(persistableMode详解)
- The request sent by the client was syntactically incorrect ()
- vim有关
- Spring框架jar包的作用
- C++虚函数实现原理
- c语言一元多项式的相加
- Effective Java 总结
- 【VMware】linux连接Xshell配置
- C语言两个文件模块的编译运行
- 进程初始化