For input string: "..."
之前在项目中通过EL表达式从cart 中取出itemPirce这个值时始终报:For input string: "${cart.itemPrice / 100}" 错误。
事故原因:
在通过视图解析器并把数据填充到ModelAndView对象中时出现无法取出itemPrice这个值(EL表达式无效)。itemPrice没有值则再通过 /100运算就会报错。
还有一种现象是在表单中出现空值并提交到后台进行处理,而提交到后台的是 " " 而不是null,则会出现此错误。
For input string: "..."的更多相关文章
- java.lang.NumberFormatException: For input string: "1608020001 " 错误
错误: java.lang.NumberFormatException: For input string: "1608020001 " at java.lang.Numbe ...
- java.lang.NumberFormatException: For input string: "Y"
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. ...
- mybatis 报错:Caused by: java.lang.NumberFormatException: For input string
mybatis的if标签之前总是使用是否为空,今天要用到字符串比较的时候遇到了困难,倒腾半天,才在一个论坛上找到解决方法.笔记一下,如下: 转自:https://code.google.com/p/m ...
- java.lang.NumberFormatException: For input string:"filesId"
做项目时候,页面获取出现了这个问题.找了好久一直以为是我字段或者是数据库字段问题导致引起的. 最后才发现是 struts2中jsp我写错了一个参数,一直导致报错.后来改了就好了. 当大家遇到这个问题的 ...
- 该死的类型转换For input string: "[Ljava.lang.String;@1352dda"
今天又遇见了这个该死的问题,还是记下来备忘. 从map里取值的时候,将OBJECT对象 先转换成String 然后转换成integer报错 java.lang.NumberFormatExceptio ...
- 解决java.lang.NumberFormatException: For input string: "id"
今天,项目突然报"java.lang.NumberFormatException:For input string:"id"",项目框架是spring,spri ...
- MyBatis报错:Caused by: java.lang.NumberFormatException: For input string: "XX"
<select id="sltTreatment" resultType="com.vitaminmd.sunny.core.bo.Treatment"& ...
- Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"
报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ding ...
- Caused by: java.lang.NumberFormatException: For input string: "18446744073709551615"
问题:Caused by: java.lang.NumberFormatException: For input string: "18446744073709551615" 原因 ...
- Redis集群环境使用的是redis4.0.x的版本,在用java客户端jedisCluster启动集群做数据处理时报java.lang.NumberFormatException: For input string: "7003@17003"问题解决
java.lang.NumberFormatException: For input string: "7003@17003" at java.lang.NumberFormatE ...
随机推荐
- c++11新特性之future
std::future可以从异步任务中获取结果,一般与std::async配合使用,std::async用于创建异步任务,实际上就是创建一个线程执行相应任务. 先看段代码: #include < ...
- 大道至简第一章伪代码读后感o(╯□╰)o
import.java.io*; import class duhougan; public static void main(Striing arges[]){ system.out.println ...
- javascript如何判断对象为空
1.自定义jQuery的isEmptyObject()方法. function isEmptyObject(e) { var t; for (t in e) return !1; return !0 ...
- IE8动态创建CSS
IE8动态创建CSS 最近在项目中用到在页面中动态创建CSS方法,记录一下方便以后查看 一. 在IE下动态创建(网上收集3种方法,最后一个方法未测试成功,具体不知道什么原因) 第一种(此方法很麻烦,需 ...
- 【Android】完善Android学习(一:API 2.3.3)
备注:之前Android入门学习的书籍使用的是杨丰盛的<Android应用开发揭秘>,这本书是基于Android 2.2API的,目前Android已经到4.4了,更新了很多的API,也增 ...
- struts2常用标签之数据标签
数据标签1 property标签 property标签的主要属性: value:用来获取值的OGNL表达式,如果value属性值没有指定,那么将会被设定为top,也就是返回位于值栈最顶端的对象. ...
- 插入排序Insertion sort 2
原理类似桶排序,这里总是需要10个桶,多次使用 首先以个位数的值进行装桶,即个位数为1则放入1号桶,为9则放入9号桶,暂时忽视十位数 例如 待排序数组[62,14,59,88,16]简单点五个数字 分 ...
- 通过gitlabAPI批量创建用户
上午服务器领导通知我给服务器所有同事添加gitlab账号,服务器总共67个人,这要是一个一个在页面添加,我得累死,是否有其他的办法呢?有问题找google,果然是可以通过gitlab的API批量添加的 ...
- jenkins Process leaked file descriptors
https://stackoverflow.com/questions/17024441/process-leaked-file-descriptors-error-on-jenkins 1. BUI ...
- python大数据挖掘系列之淘宝商城数据预处理实战
数据清洗: 所谓的数据清洗,就是把一些异常的.缺失的数据处理掉,处理掉不一定是说删除,而是说通过某些方法将这个值补充上去,数据清洗目的在于为了让我们数据的可靠,因为脏数据会对数据分析产生影响.拿到数据 ...