session.setAttribute returns an object, so you need to cast the object to your specific type. In your case,

Hashtable mytable = (Hashtable) session.getAttribute("styles", styles) ; // double check this for syntax errors pls.

Printout your hashtable, and see if you gets stuff.
good luck paul .

[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