Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   session attribute (http://www.velocityreviews.com/forums/t128738-session-attribute.html)

Steve Jones 11-16-2003 03:46 PM

Re: session attribute
 
On Sun, 16 Nov 2003 09:14:44 -0800, Zee wrote:

> I am having problem with session attribute for example
>
> ArrayList customer = CustomerBean.getCustomer(conn);
> session.setAttribute("customer", customer);
>
> My question is why we are using two parameter there and what is the purpose?
>


The first parameter is the reference used to access the object in the
future, and the second parameter is the object itself.


> My next question is how can I call this session attribut to get the preserve
> data?


session.getAttribute("customer");

Note that getAttribute returns an Object, so you'll have to cast it back
to an ArrayList.


Of course, this is all in the API documentation :)

Steve.



>
> Thanks in advance.
>
> Zee



Zee 11-16-2003 05:14 PM

session attribute
 
I am having problem with session attribute for example

ArrayList customer = CustomerBean.getCustomer(conn);
session.setAttribute("customer", customer);

My question is why we are using two parameter there and what is the purpose?

My next question is how can I call this session attribut to get the preserve
data?

Thanks in advance.

Zee




All times are GMT. The time now is 10:14 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.