Sign-up....

在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

谢谢!

[5 byte] By [msdn] at [2007-8-14 22:11:26]
# 1 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

int不是Object

kingfish at 2005-7-9 14:27:04 >
# 2 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

是的,可是要怎样做才能转换成int呢?谢谢!

luoxiang2000 at 2005-7-9 15:27:15 >
# 3 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

Integer nRos=new Integer(request.getAttribute("row"););

dobly at 2005-7-9 15:28:25 >
# 4 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

int nRow = ((Integer)request.getAttribute("row")).intValue();

YuLimin at 2005-7-9 16:05:01 >
# 5 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

int nRow = 0;

Integer oInt = new Integer(request.getAttribute("row"));

还是不行,报错:

"123.jsp": cannot find symbol; symbol : constructor Integer(java.lang.Object), location: class java.lang.Integer

"123.jsp": internal error; cannot instantiate java.lang.Integer.<init> at java.lang.Integer to ()

luoxiang2000 at 2005-7-9 16:06:48 >
# 6 Re: 在jsp页面里面这样写为什么通不过编译???int nRow = (int)request.getAttribute("row");谢谢!

int nRow = ((Integer)request.getAttribute("row")).intValue();可以呢!谢谢大家!

luoxiang2000 at 2005-7-9 16:14:47 >

Web

All Classified