kishan66
asked on
Array required, but java.sql.Array found
Hi,
I am getting the Error at
"out.println("The object present is " + arrobj[1]);"
where ---------------------
Object[] obj;
Object[] obj_sat3;
obj_sat3 = ar2.toArray();
obj = ar.toArray();
session.setAttribute("obj1 ",obj);
session.setAttribute("obj3 ",obj_sat3 );
Array arrobj = (Array)session.getAttribut e("obj1");
out.println("The object present is " + arrobj[1]);
-------------------------- ---------- ------
but when i just use the obj object rather than session name "obj1" it works fine....
out.println("The object present is " + obj[1]);
Environment:-- JSP
thanks
I am getting the Error at
"out.println("The object present is " + arrobj[1]);"
where ---------------------
Object[] obj;
Object[] obj_sat3;
obj_sat3 = ar2.toArray();
obj = ar.toArray();
session.setAttribute("obj1
session.setAttribute("obj3
Array arrobj = (Array)session.getAttribut
out.println("The object present is " + arrobj[1]);
--------------------------
but when i just use the obj object rather than session name "obj1" it works fine....
out.println("The object present is " + obj[1]);
Environment:-- JSP
thanks
>>session.setAttribute("ob j1",obj);
have only one value
so try this arrobj[0]);
have only one value
so try this arrobj[0]);
ASKER
Hi Gurvinder,
I tried all the Print statements...
--first two throws nothing...empty string though i used simple text like..
out.println("The object present is " + arrobj.getClass());
out.println("The object present is " + arrobj);
"I guess there is some problem with "
Array arrobj = (Array)session.getAttribut e("obj1");
--Third print statement
Error-- Variable length at
out.println("The object present is " + arrobj.length);
thanks
I tried all the Print statements...
--first two throws nothing...empty string though i used simple text like..
out.println("The object present is " + arrobj.getClass());
out.println("The object present is " + arrobj);
"I guess there is some problem with "
Array arrobj = (Array)session.getAttribut
--Third print statement
Error-- Variable length at
out.println("The object present is " + arrobj.length);
thanks
>>>>>>Error-- Variable length at
out.println("The object present is " + arrobj.length);
u cant find array length . u can find only size
out.println("The object present is " + arrobj.length);
u cant find array length . u can find only size
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
out.println("The object present is " + arrobj.getClass());
out.println("The object present is " + arrobj);
out.println("The object present is " + arrobj.length);