HTTP Status 400 -


type Status report

message

description The request sent by the client was syntactically incorrect.


Apache Tomcat/7.0.77

description:由客户端发送的请求是语法上是不正确的

关于这个400-,大部分都是说前端jsp页面的控件名称(name)和controller中接收的参数名称不一致,有这个原因,今天我想记录的是除了这个原因之外还有一个原因就是jsp页面上的某些实体参数标签是不能展示的,因为它根本就没有进到control层

这是我的修改用户信息control

@RequestMapping(value = "/updateUserInfo", method = RequestMethod.POST)
public String updateUserInfo(User user, RedirectAttributes redirectAttributes) {
User newUser = user;
userService.updateUserByUserName(newUser);
redirectAttributes.addAttribute("username", newUser.getUserName());
return "redirect:listUserInfo";
} jsp页面的userPhone与control层的userPhone不一致,我只能暂时先注释掉userPhone
<%--<tr>--%>
<%--<td class="mdl-data-table__cell--non-numeric">用户电话:</td>--%>
<%--<td>--%>
<%--<div class="mdl-textfield mdl-js-textfield">--%>
<%--&lt;%&ndash;@declare id="userphone"&ndash;%&gt;<input class="mdl-textfield__input" type="text" pattern="-?[0-9]*(\.[0-9]+)?"--%>
<%--name="userPhone"--%>
<%--value="${user.userPhone}">--%>
<%--<label class="mdl-textfield__label" for="userPhone"></label>--%>
<%--</div>--%>
<%--</td>--%>
<%--</tr>--%>
然后问题锁定在userPhone这里,现在就是抓住这个userPhone参数来进行调试,参考了这篇文章:https://cuisuqiang.iteye.com/blog/2054234
然后参考了这篇文章springmvc form表单提交报400错误:https://blog.csdn.net/zlsdmx/article/details/54923422
此文章描述了日期类型和integer类型前台和后台数据库传参报错的问题,举例了日期类型在实体类中的修改方法,但是整数类型的电话号码有所不同,但是我可以把数据库中的电话号码类型换成vachar类型,这样就可以了 综上所述,springmvc form表单提交报400错误不一定是前台表单的参数与control层参数不一致,也有可能是数据库中字段如日期,电话的类型与表单需要的类型不一致,需要在类型方面做修改
												

The request sent by the client was syntactically incorrect.的更多相关文章

  1. SpringMVC报错The request sent by the client was syntactically incorrect ()

    springmvc数据绑定出的错 在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写, 如果不一致,可能回报如下错误: The requ ...

  2. "The request sent by the client was syntactically incorrect ()"问题定位及解决:

    Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法: 把spring日志级 ...

  3. The request sent by the client was syntactically incorrect问题解决

    The request sent by the client was syntactically incorrect意思嘛,google翻译一下 通过日志不难看出,是由参数不匹配造成的. 所以对于Da ...

  4. 错误:The request sent by the client was syntactically incorrect的解决

    问题: 错误400-The request sent by the client was syntactically incorrect. springMVC中,某个页面提交时报400错误,如下图. ...

  5. spring mvc 在上传图片时,浏览器报The request sent by the client was syntactically incorrect

    项目中,在一个jsp页面里其它图片上传是功能是可以使用的,当我自己新加了一个图片上传时,提交表单后,浏览器报The request sent by the client was syntactical ...

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

    在SpringMVC中使用@RequestBody和@ModelAttribute注解时遇到了很多问题,现记录下来. @ModelAttribute这个注解主要是将客户端请求的参数绑定参数到一个对象上 ...

  7. HTTP Status 400 - description The request sent by the client was syntactically incorrect.

    HTTP Status 400 - type Status report message description The request sent by the client was syntacti ...

  8. 又见The request sent by the client was syntactically incorrect ()

    前几天遇到过这个问题(Ref:http://www.cnblogs.com/xiandedanteng/p/4168609.html),问题在页面的组件name和和注解的@param名匹配不对,这个好 ...

  9. 错误The request sent by the client was syntactically incorrect ()的解决

    http://www.cnblogs.com/xiandedanteng/p/4168609.html 这个错误是SpringMVC报出来的,见到它意味着html/jsp页面的控件名称 和 contr ...

随机推荐

  1. 【转】SQL FOR XML简介及用法

    摘要:sql中的for xml语法为表转化为xml提供了很好的支持,当然使用同样的程序语言也能够达到同样的效果,但是有了for xml将使得这一切更加的方便. 主要内容: Select 的查询结果会作 ...

  2. win10 下Oracle安装

    在win10 64bit下安装oracle 11的时候,有些问题不注意,安装的时候才遇到就gg了.下面将介绍win10下安装oracle 11的步骤以及安装过程中遇到的一些问题及解决方案. 安装过程中 ...

  3. CF特征码遍历

    HOOK_游戏代码 8B 00 8B 08 8B 91 A8 00 00 00 地址-15 4E5E954E5EA 44E5E95DIRECT 从733E00开始搜 6B 00 94 51 6C 地址 ...

  4. django 自定义中间件 middleware

    Django 中间件 Django中的中间件是一个轻量级.底层的插件系统,可以介入Django的请求和响应处理过程,修改Django的输入或输出.中间件的设计为开发者提供了一种无侵入式的开发方式,增强 ...

  5. sql盲注之报错注入(附自动化脚本)

    作者:__LSA__ 0x00 概述 渗透的时候总会首先测试注入,sql注入可以说是web漏洞界的Boss了,稳居owasp第一位,普通的直接回显数据的注入现在几乎绝迹了,绝大多数都是盲注了,此文是盲 ...

  6. zookeeper集群环境搭建详细图文教程

    zookeeper集群环境搭建详细图文教程 zhoubang @ 2018-01-02 [文档大纲] 友情介绍 软件环境 注意点 环境安装 1. 新建用于存储安装包以及软件安装的目录 2. 下载安装z ...

  7. Window - 浏览器对象模型

    浏览器对象模型 (BOM) 浏览器对象模型(Browser Object Model (BOM))尚无正式标准. 由于现代浏览器已经(几乎)实现了 JavaScript 交互性方面的相同方法和属性,因 ...

  8. (LPC1769) Timer Interrupt Application

    void TIMER0_IRQHandler (void) { if(LPC_TIM0->IR & 0x01) { LPC_GPIO1->FIOPIN ^= ( << ...

  9. Java执行Shell脚本“No such file or directory” (win->Linux)异常的可能原因

    转自:http://blog.csdn.net/zlpdaisy/article/details/6134314 用Runtime.getRuntime().exec()方法执行Linux的一个She ...

  10. linux中的tar命令的使用

    参考网址: https://www.cnblogs.com/newcaoguo/p/5896975.html https://www.cnblogs.com/xccjmpc/p/6035397.htm ...