Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > session attribute

Reply
Thread Tools

session attribute

 
 
Steve Jones
Guest
Posts: n/a
 
      11-16-2003
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


 
Reply With Quote
 
 
 
 
Zee
Guest
Posts: n/a
 
      11-16-2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Timeout problems-web.confg session state and IIS session s =?Utf-8?B?Um9iSEs=?= ASP .Net 4 04-11-2007 04:52 PM
picking value of one attribute based on a child elements attribute? XPath? vjethava@gmail.com XML 2 03-06-2006 05:19 AM
XSLT: Making attribute to parent attribute Bostonasian XML 1 09-18-2005 07:30 AM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM
How can I "know" the difference between a session timed out and a session that did session.abort? Jazzis ASP General 2 09-23-2003 07:16 AM



Advertisments