关于一个ognl的一简单问题 我在使用ognl表达时到一个roomType的对象我怎么样将roomType里面的一个属性值打印现来呢就是在alert("")中该怎么写呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <td><input type="button" value="订购"onClick="javascript:alert('${roomType.hotelId}' })" />严重: Servlet.service() for servlet jsp threw exceptionjava.lang.NumberFormatException: For input string: "hotelId" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source)之前也也试过,可是报这个错 是不是因为那个hotelId的属性值是int类型号的原因呢? 是Int类型的原因,改成String吧 大哥,刚测试了,不是int类型的关系,我传一个String类型号的属性,也会报同样的错误, 这个太明显了。用的struts2.x号..类型转换的问题呀..> 75% 的可能性是因为你提交过 非 整形的 数 如 "abc" 到actionName.HoteId中去..很显然。。在发生类型转换时就会有numberFormateExcepton! javascript:alert('${roomType.hotelId}')把‘’去掉 不是啦,我也不知道是什么原因,但去掉那个roomType就成了!~~很奇怪的....感谢大家的关注啊!!! 各位大神。关于checkbox的问题跪求帮助 请教一下,web页面的保密怎么做!保护数据 onunload事件怎么判断是点击网页的刷新按钮,而不是点击关闭呢? JFreeChart 0.9.11 底部字体设置问题 windows下JDK6.0+TOMCAT6.0配置问题?请各位帮看看,在线等! eclipse运行java找不到main 如何在JSP页面中实现像C/S结构的多行修改,100分相送!!!!! 求助:resin 里不能传递 中文Url! 求des算法的javabean源码 运行servlet出错! struts里错误信息的返回 jsp web怎么不能运行!!!!帮忙看看
<input type="button" value="订购"
onClick="javascript:alert('${roomType.hotelId}' })" />严重: Servlet.service() for servlet jsp threw exception
java.lang.NumberFormatException: For input string: "hotelId"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)之前也也试过,可是报这个错
把‘’去掉