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

项目中一直出现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"  

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

<input type="text" class="Wdate"  

 

更多请参考:

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