400 Bad Request The request sent by the client was syntactically incorrect ().

时间:2014-05-12 19:34:51   收藏:0   阅读:221

 

项目中一直出现400错误,后面搜索下,发现如下内容。

SpringMVC报错信息为The request sent by the client was syntactically incorrect ()

在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写,如果不一致,可能回报如下错误: The request sent by the client was syntactically incorrect ().

从字面上理解是:客户端发送的请求语法错误。实际就是springmvc无法实现数据绑定。 

然后跟踪了下jsp代码,果然有不一致的地方,

 

<input type="text" class="Wdate" id="start_date" name="start_date" value="${data.s_start_date}" 

修改也如下内容,就解决了

<input type="text" class="Wdate" id="s_start_date" name="s_start_date" value="${data.s_start_date}" 

 

更多请参考:

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

400 Bad Request The request sent by the client was syntactically incorrect ().,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!