My two cents:

1. int is a java primitive type and your assigning an object to it, that's illegal.
2. You need to cast the call into an Int object

something like:

Int styles[] = (Int) session.getAttribute("styles");

Hope this helps.
On Wednesday, November 20, 2002, at 10:02 PM, [EMAIL PROTECTED] wrote:

Great,

I have styles which is an int array (to become hashtable) and want to
retrieve it from another page (you assume correctly).

I have: session.setAttribute("styles", styles); which runs OK

and: session.getAttribute("styles", styles); which is throwing a compiler
error.

It's been a while since I used session. Just reading the API, getAttribute
takes a single parameter? With adjustment:

int styles[] = session.getAttribute("styles");

I get another compiler error. What am I doing wrong?

Thanks

Paul.





Paul,
I assume you are asking if you can store something in a session to share
between pages. Yes, you can store an object (such as a Hashtable) in the
session object. You can use session.setAttribute(key, value) or
session.getAttribute() to retrieve it.

David

On 11/20/2002 10:31 PM, [EMAIL PROTECTED] wrote:

Hello,
Can anyone tell me, can a hash table be defined as a session and
retrieved from another page as can an array?

Thanks

Paul.



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to