Struts 2模型驱动的负整数

时间:2012-08-10 13:32:54

标签: java struts2 negative-number model-driven

如何将负数(-123或-123.00)分配给ModelDriven bean (实现ModelDriven< Bean>)。 当我尝试通过请求传递该值时,它会抛出异常

Fri Aug 10 18:45:27 IST 2012 unable to convert value using type converter [com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter]
Overflow or underflow casting: "-123.12" into class java.lang.Double - [unknown location]
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.doConvertToNumber(XWorkBasicConverter.java:406)
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.doConvertToNumber(XWorkBasicConverter.java:415)
    at com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter.convertValue(XWorkBasicConverter.java:118)

0 个答案:

没有答案