pass an array from servlet to JSP

Hi,

I want to pass an array from servlet to JSP page.

in the servlet:

stringArray[0]= "string1";

stringArray[1]= "string2";

stringArray[2]= "string3";

session.setAttribute("stringarray", stringArray);

in the jsp:

String[] stringArray=session.getAttribute("stringarray");

but it seems that session.getAttribute returns an "object" and mismatch with String[]. Does anyone know how to solve this and get the array from the servlet? I will be very appreciate if anyone knows how to do it.

[549 byte] By [karenJJa] at [2007-11-27 9:10:03]
# 1
no bother. I got it.String[] stringArray=(String[] )session.getAttribute("stringarray"); will work.
karenJJa at 2007-7-12 21:51:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...