Can I store arrays in a session? How would I call it from another jsp?
Pretty straight forward question. I need to save a parameter in an array. This variable can change so I need to save the different values in an array. Can I call this array from another jsp? Thanks in advance.Mike
[234 byte] By [
mikesab] at [2007-9-26 6:28:26]

Arrays are Java objects, so yes, you can store them as Request, Session, or Context named attributes, just as you would with any other Java object.
i think something like this should work... jsp 1:int arr[]={1,2,3,4,5};session.put("arrname",arr);and in jsp 2: int[] arr=(int[])session.get("arrname");hope this helps.