页面使用时间插件导致http 400错误
2016-11-10 00:00
239 查看
页面使用jquery是采用了时间插件,后台采用的是springMVC,直接请求的时候会报400错误,这是因为没有使用时间格式转换,使用时间的时候可以使用如下的代码进行转换,格式需要根据页面格式来进行转换
@InitBinder public void initBinder(WebDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH"); dateFormat.setLenient(false); binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); }
相关文章推荐
- 页面间隔半秒钟更新时间 Asp.net使用Comet开发http长连接示例分享
- HTTP 错误 405.0 - Method Not Allowed 无法显示您正在查找的页面,因为使用了无效方法(HTTP 谓词)。
- 页面间隔半秒钟更新时间 Asp.net使用Comet开发http长连接示例分享
- https和http情况下,H5页面调起微信的拍照与分享功能,导致的config:invalid signature这个错误的解决办法
- 在input中回车后页面提交导致出现HTTP 错误 405.0 - Method Not Allowed
- React-Native工程,使用AC-QRCode-RN插件导致其他页面的InteractionManager方法不被执行
- 在使用 HttpWebRequest Post数据时候返回 400错误
- 使用uploadify上传插件时遇到 NetworkError: 403 Forbidden http://xxxx/xxxx/ 错误
- 在input中回车后页面提交导致出现HTTP 错误 405.0 - Method Not Allowed
- 在input中回车后页面提交导致出现HTTP 错误 405.0 - Method Not Allowed
- 对于使用类似springmvc requestmapping跳转至页面导致的静态资源文件找不到的错误的理解
- jsp页面使用java Map集合报错,无错误情况下HTTP500报错解决方法
- 使用WdatePicker时间插件简单的控制页面上两个时间选择的前后范围
- 使用EhCache时,用户按住F5刷新页面,导致socket write error错误的解决方法
- ajax缓存导致的一个错误,使用时间戳完美解决
- 使用WdatePicker时间插件简单的控制页面上两个时间选择的前后范围
- ajax json 调用WCF,服务端FaultException导致 http 400 bad request错误的解决方式
- ###struts模型驱动(必须new)能够封装【对象类型属性的属性】.页面传参错误导致的问题:HTTP Status 500 - could not execute statement;
- 在vc中是使用ado连接数据库时,没有初始化COM导致错误
- 长时间执行ASP.NET导致错误“Http Request timed out”错误