java.lang.NumberFormatException: For input string: 亟需帮助
本帖最后由 waynecook 于 2013-12-20 12:06:25 编辑 HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /front/personal/trepair_query.jsp at line 190
187: <bean:define id="id" name="repairForm"/>
188: <tr align="center" bgcolor="#FFFFFF">
189:
190: <td height="18" bgcolor="#FFFFFF"><div align="center" class=" STYLE1">${repairForm.repairTorepairId}</div></td>
191: <td height="18" bgcolor="#FFFFFF"><div align="center" class=" STYLE1">${repairForm.repairStaffId}</div></td>
192: <td height="18" bgcolor="#FFFFFF"><div align="center" class=" STYLE1">${repairForm.repairRate}</div></td>
193: <td height="18" bgcolor="#FFFFFF"><div align="center" class=" STYLE1">${repairForm.repairDate}</div></td>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NumberFormatException: For input string: "repairTorepairId"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.parseInt(Integer.java:497)
javax.el.ArrayELResolver.coerce(ArrayELResolver.java:153)
javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)
javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
org.apache.el.parser.AstValue.getValue(AstValue.java:97)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)
org.apache.jsp.front.personal.trepair_005fquery_jsp._jspService(trepair_005fquery_jsp.java:328)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
Apache Tomcat/6.0.13
------解决方案--------------------
你输入的字符串是repairTorepairId想把它转成Int肯定报错啊
[解决办法]
For input string: "repairTorepairId"
不能转换为数字
[解决办法]
看需要的值是否是 ${repairForm.repairTorepairId}这个值,看下这个值是多少,是否是数字,是的话那就说明你传递的时候出错了,没有拿到值,而直接给了id过去了
[解决办法]
${repairForm.repairTorepairId} 这个值是什么,是不是传过去一个字符串“repairTorepairId”
[解决办法]
看下 ${repairForm.repairTorepairId} 是多少。格式化错误了。
[解决办法]
转型错误啊 你是不是输入字符串去转number类型了 肯定转不动的啊..