request.setAttribute("doubStr", 2.2);错误提示:The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, double)
The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, double) 这样double d=2.2; request.setAttribute("doubStr", 2.2); 实在不行就先传递String的2.2过去,之后再转换
applicable for the arguments (String, double) 这样double d=2.2;
request.setAttribute("doubStr", 2.2); 实在不行就先传递String的2.2过去,之后再转换
我知道很多人都不会有这个问题
1.5以上的可以
________________________________________
顶....是这么回事的..Jdk5.0 后的版本对数据类型可以自动转型...
看起来就是jdk版本的问题了!
我用的1.5
强转好像不行