You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mufaddal Khumri <mu...@wmotion.com> on 2003/04/22 12:04:27 UTC
regarding request.setAttribute( ... )
Hi,
I am trying to set an attribute "d" in my servlet to a String array:
String dArray[] = new String[10];
dArray[0] = "Hello";
dArray[1]= "World";
request.setAttribute("d", dArray);
In my jsp :
<%
String [] dw = (String [])request.getAttribute("d");
%>
The above code causes a class cast exception !.
Does anybody know why ? Also how can i get a String [] from my servlet
to my jsp if what I am trying to accomplish isnt correct ?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org