syntactically incorrect() 404】的更多相关文章

遇到这个错误就来记录一下吧. 这个错误是springMVC报出的错误.大致的意思就是form传值的类型和controller中的参数不符. 有可能是名字错误,有可能是类型不对.比如前面你传来的是  param="test",而你后台用   int param是肯定不行啊…
在SpringMVC中使用@RequestBody和@ModelAttribute注解时遇到了很多问题,现记录下来. @ModelAttribute这个注解主要是将客户端请求的参数绑定参数到一个对象上,不用将很多参数@RequestParam或是@PathVariable. 但是在使用过程中遇到了问题, 第一次Html端请求代码如下,请求方式1 // 简单键值对 var data = { productTypeIds : vproducttypeid, channelTypeId : vchan…
springmvc数据绑定出的错 在数据绑定的时候一定要主意Controller方法中的参数名和jsp页面里的参数名字是否一致或者按照绑定的规范来写, 如果不一致,可能回报如下错误: The request sent by the client was syntactically incorrect (). 从字面上理解是:客户端发送的请求语法错误. 实际就是springmvc无法实现数据绑定. 查看一下你传的参数是不是有date类型等Springmvc不支持参数绑定的类型,需自己绑定 date…
Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法: 把spring日志级别调整到debug级别,可以看到更多的前端请求后台的日志,可以更精确的定位到底哪里出错了. log4j.properties添加一行: log4j.logger.org.springframework=DEBUG 看到console控制台日志:日期转换异常.一般是你前端的页面的日期传到后台,格式转换异常.需要…
The request sent by the client was syntactically incorrect意思嘛,google翻译一下 通过日志不难看出,是由参数不匹配造成的. 所以对于Date日期转换问题解决方法是 在相应的controller中添加如下代码: @InitBinder protected void initBinder(WebDataBinder binder) { SimpleDateFormat dateFormat = new SimpleDateFormat(…
问题: 错误400-The request sent by the client was syntactically incorrect. springMVC中,某个页面提交时报400错误,如下图. 解决方法: 1.在网上找了一下,答案是通常遇到这个错误是因为前端jsp页面的控件名称和controller中接收的参数名称不一致.但仔细对比了一遍发现没有问题.很郁闷. 2.然后就反复的提交那个页面进行测试,发现了问题,因为我是将多个参数作为一个实体传至controller,发现某个文本框为空时,提…
项目中,在一个jsp页面里其它图片上传是功能是可以使用的,当我自己新加了一个图片上传时,提交表单后,浏览器报The request sent by the client was syntactically incorrect.排查了好久,最终是因为我新加的图片上传中,input 的name属性与上传对象中一个属性的名字相同导致的. 所以如果在遇到这种类型的报错时,我们应该考虑提交请求的数据名称是否重复或者数据类型是否不一致.…
HTTP Status 400 - type Status report message description The request sent by the client was syntactically incorrect. 参数类型不对引起的. @RequestParam long lo , 需要的是 long, 我实际传递的是 abc. 所以.…
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中接收的参数名称不一致,有这个原因,今天我想记录的是除了这个原因之外还有一…
前几天遇到过这个问题(Ref:http://www.cnblogs.com/xiandedanteng/p/4168609.html),问题在页面的组件name和和注解的@param名匹配不对,这个好解决,一一对好就行了. 但是,这回情况不一样了,我的页面控件是类似这样的: <p style="height:280px;display:block;"> <span class="req"> <label><input typ…
springMVC中,某个页面提交时报400错误,如下图.     解决方法: 1.在网上找了一下,答案是通常遇到这个错误是因为前端jsp页面的控件名称和controller中接收的参数名称不一致.但仔细对比了一遍发现没有问题.很郁闷.   2.然后就反复的提交那个页面进行测试,发现了问题,因为我是将多个参数作为一个实体传至controller,发现某个文本框为空时,提交就会报错,于是去实体中查看该文本框对应的参数属性,发现与其他参数不同,定义的为int类型.于是就懂了. 简单的说:传递的参数类…
http://www.cnblogs.com/xiandedanteng/p/4168609.html 这个错误是SpringMVC报出来的,见到它意味着html/jsp页面的控件名称 和 controller里函数的参数不符. 好比界面有个这样的form <form name="form1" action="uploadDocument.html" method="post" ENCTYPE="multipart/form-da…
原因: 1.参数名称不一致 2.参数类型不一致…
此问题一般是在前端的数据传回是封装成对象失败的情况: 1.对象名不一致: 2.对象的数据类型不一致: 特别注意日期类型的: 如果前端是date数据类型的话: 传入的日期有问题 在pojo类中限定 @DateTimeFormat(pattern = "yyyy-MM-dd") private Date inventoryTime;…
最近在做Web开发的时候,使用$.post提交数据,但是回调函数却没有被触发,按F12看控制台输出是:POST *** 400 Bad Request 后台是SpringMVC的,设置了断点也不会被触发. 后来查看JQuery资料了解到,$.post提交数据只有成功时才触发回调函数,于是改用$.ajax提交数据,添加error回调函数,得到错误信息了,如下图: 这个问题是什么原因造成的呢? 后来经过测试发现,是表单提交的内容数据类型与实体的(也就是数据表字段)的数据类型不匹配导致的. 在提交表单…
在其他对象属性类型一样情况下,只需要创建一个类,再在springmvc.xml中添加配置: package com.ujiuye.common; import org.springframework.core.convert.converter.Converter; import java.text.SimpleDateFormat; import java.util.Date; public class DateTimeConverter implements Converter<String…
shi用url传递参数,其他页面都ojbk的 唯独有一个请求 不应该啊 这明显的已经配置好了啊 因为别的请求我也是这样配置的啊,运行是没问题的啊 运行好好的啊 一时间,感觉无从下手了 经过十几分钟各种猜想,突然想起来 电话号码是存储为String,而不是int 修改之后,问题解决…
内容 一.异常信息 HTTP Status 400 - type Status report message description The request sent by the client was syntactically incorrect. Apache Tomcat/7.0.37 二.解决办法 1.造成原因 SpringMVC 错误,由于前端界面传递错误参数类型给后台,后台就收参数后,转换参数类型失败导致. 2.解决 打开浏览器控制台,点击 network 查看传递的参数是什么,然…
利用spring mvc 实现crud 1.导入jar包 commons-logging-1.2.jarjstl.jarspring-aop-4.1.6.RELEASE.jarspring-beans-4.1.6.RELEASE.jarspring-context-4.1.6.RELEASE.jarspring-core-4.1.6.RELEASE.jarspring-expression-4.1.6.RELEASE.jarspring-web-4.1.6.RELEASE.jarspring-w…
前言 知识点 1.JSP是什么   java  server   page,javaserver端页面技术.其主要作用在server端动态生成页面, 其组成java代码和html, 2.JSP的组成    html:包含css/js    java        java代码段               <%java代码%>        表达式              <%=%> 3.隐含对象    对象不须要创建,能够直接调用.   out  . request   .re…
在HtttpServletResponse类中有关于状态码的描述. static int SC_ACCEPTED Status code (202) indicating that a request was accepted for processing, but was not completed. 状态码(202)表明处理的请求被接受,但未能完成. static int SC_BAD_GATEWAY Status code (502) indicating that the HTTP se…
//继承ServletResponse,发送回复信息,servlet容器创建一个HttpServletResponse对象,将它作为service函数的参数 public interface HttpServletResponse extends ServletResponse { /** * Adds the specified cookie to the response. This method can be called * multiple times to set more than…
InfluxDB HTTP API reference API地址:https://docs.influxdata.com/influxdb/v1.6/tools/api/ The InfluxDB HTTP API provides a simple way interact with the database. It uses HTTP response codes, HTTP authentication, JWT Tokens, and basic authentication, and…
ylbtech-Java-API:javax.servlet.http.HttpServletResponse 1.返回顶部 1. javax.servlet.http Interface HttpServletResponse All Superinterfaces: ServletResponse All Known Implementing Classes: HttpServletResponseWrapper public interface HttpServletResponse ex…
JSP Response Set Status In this tutorial you will learn about how to set the HTTP status code in JSP. In Java you can specify a HTTP-specific functionality regarding to send response. An interface HttpServletResponse provides these facility. This int…
Spring MVC教程--检视阅读 参考 Spring MVC教程--一点--蓝本 Spring MVC教程--c语言中午网--3.0版本太老了 Spring MVC教程--易百--4.0版本不是通过maven创建的 Spring MVC教程--javaschool纯理论 Spring MVC应用--javaschool纯理论 Spring MVC学习总结 Spring MVC 4.2.4.RELEASE 中文文档--基础学习后看 SpringMVC面试题 目前大多数使用的是spring4.x…
UVa 101 The Blocks Problem 一道纯模拟题 The Problem The problem is to parse a series of commands that instruct a robot arm in how to manipulate blocks that lie on a flat table. Initially there are nblocks on the table (numbered from 0 to n-1) with block bi…
1. 问题描述: 今天在SpringMVC应用中上传参数的时候遇到如下问题: The request sent by the client was syntactically incorrect 这说明在提交的参数中,有的参数不符合服务器端数据要求.在排除其它参数没问题的情况下,确定是其中的时间参数除了问题. 客户端传送的时间参数如下所示:…
The request sent by the client was syntactically incorrect. ajax发起请求时报400错误.请求代码如下: var reportId=($(obj).parent().parent().parent().children(":first").attr("value")); var isChecked=$(obj).prop("checked")=="checked"?…
题目来源:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=37   The Blocks Problem  Background Many areas of Computer Science use simple, abstract domains for both analytical and empiric…